File tree Expand file tree Collapse file tree 8 files changed +158
-0
lines changed Expand file tree Collapse file tree 8 files changed +158
-0
lines changed Original file line number Diff line number Diff line change @@ -99,3 +99,4 @@ This menu allows you to warp to various places around the game. A description fo
99
99
There are several other changes that have been made outside of the menu:
100
100
1 . The current Sequence value is displayed in the pause menu next to Mario's stats.
101
101
2 . The unused Mega badges can be used in battles without the need for a boot/hammer upgrade.
102
+ 3 . Holding Y while using Art Attack will pause the timer that is used to check how long you are able to use it for.
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class Mod
18
18
bool performPreBattleActions ();
19
19
int32_t preventMenuSounds (int32_t , uint32_t , uint32_t , uint32_t );
20
20
const char *getCustomMessage (const char *);
21
+ uint32_t pauseArtAttackTimer ();
21
22
22
23
private:
23
24
void (*mPFN_makeKey_trampoline )() = nullptr ;
@@ -28,6 +29,7 @@ class Mod
28
29
int32_t (*mPFN_SoundEfxPlayEx_trampoline )(int32_t , uint32_t ,
29
30
uint32_t , uint32_t ) = nullptr ;
30
31
const char *(*mPFN_msgSearch_trampoline )(const char *) = nullptr ;
32
+ uint32_t (*mPFN_scissor_timer_main_trampoline )() = nullptr ;
31
33
};
32
34
33
35
}
Original file line number Diff line number Diff line change 1406
1406
// 801AB220:marioResetCamShiftRate
1407
1407
// 801AB284:marioResetCamShift
1408
1408
1409
+ // sac_scissor.o
1410
+ // 80234D0C:wait_star_standby
1411
+ // 80234D44:star_stone_appear
1412
+ // 80234D70:scissor_end
1413
+ // 80234DE0:scissor_init
1414
+ // 80234E54:scissor_disp_region
1415
+ // 80235154:scissor_offscreen
1416
+ // 80235194:scissor_disp_control
1417
+ // 802353CC:scissor_capture
1418
+ // 80235434:scissor_ofscreen_ok
1419
+ // 80235498:scissor_damage_sub2
1420
+ // 802355B4:scissor_damage_sub
1421
+ // 8023581C:scissor_damage
1422
+ // 80235AA8:scissor_control
1423
+ 80235EC4:scissor_timer_main
1424
+ // 8023602C:scissor_timer_get
1425
+ // 80236088:star_disp2D_sub
1426
+ // 80236230:star_disp2D
1427
+ // 802362A0:star_control
1428
+ // 8023673C:weaponGetPower_Scissor
1429
+ // 802367C8:tess
1430
+ // 80236A14:scissor_tess
1431
+ // 80236A84:scissor_cross
1432
+ // 80236EB0:scissor_intersection4
1433
+ // 80236F50:scissor_intersection3
1434
+ // 80236FEC:scissor_intersection2
1435
+ // 8023706C:scissor_intersection
1436
+ 802376C4:GetScissorPtr
1437
+
1409
1438
// runtime.c
1410
1439
8026849C:_savefpr_14
1411
1440
802684A0:_savefpr_15
Original file line number Diff line number Diff line change 1398
1398
// 801A3578:marioResetCamShiftRate
1399
1399
// 801A35DC:marioResetCamShift
1400
1400
1401
+ // sac_scissor.o
1402
+ // 8022BBCC:wait_star_standby
1403
+ // 8022BC04:star_stone_appear
1404
+ // 8022BC30:scissor_end
1405
+ // 8022BCA0:scissor_init
1406
+ // 8022BD14:scissor_disp_region
1407
+ // 8022C014:scissor_offscreen
1408
+ // 8022C054:scissor_disp_control
1409
+ // 8022C28C:scissor_capture
1410
+ // 8022C2F4:scissor_ofscreen_ok
1411
+ // 8022C358:scissor_damage_sub2
1412
+ // 8022C474:scissor_damage_sub
1413
+ // 8022C6DC:scissor_damage
1414
+ // 8022C968:scissor_control
1415
+ 8022CD84:scissor_timer_main
1416
+ // 8022CEEC:scissor_timer_get
1417
+ // 8022CF48:star_disp2D_sub
1418
+ // 8022D0F0:star_disp2D
1419
+ // 8022D160:star_control
1420
+ // 8022D5FC:weaponGetPower_Scissor
1421
+ // 8022D688:tess
1422
+ // 8022D8D4:scissor_tess
1423
+ // 8022D944:scissor_cross
1424
+ // 8022DD70:scissor_intersection4
1425
+ // 8022DE10:scissor_intersection3
1426
+ // 8022DEAC:scissor_intersection2
1427
+ // 8022DF2C:scissor_intersection
1428
+ 8022E584:GetScissorPtr
1429
+
1401
1430
// runtime.c
1402
1431
8025E90C:_savefpr_14
1403
1432
8025E910:_savefpr_15
Original file line number Diff line number Diff line change 1404
1404
// 801A9544:marioResetCamShiftRate
1405
1405
// 801A95A8:marioResetCamShift
1406
1406
1407
+ // sac_scissor.o
1408
+ // 8023127C:wait_star_standby
1409
+ // 802312B4:star_stone_appear
1410
+ // 802312E0:scissor_end
1411
+ // 80231350:scissor_init
1412
+ // 802313C4:scissor_disp_region
1413
+ // 802316C4:scissor_offscreen
1414
+ // 80231704:scissor_disp_control
1415
+ // 8023193C:scissor_capture
1416
+ // 802319A4:scissor_ofscreen_ok
1417
+ // 80231A08:scissor_damage_sub2
1418
+ // 80231B24:scissor_damage_sub
1419
+ // 80231D8C:scissor_damage
1420
+ // 80232018:scissor_control
1421
+ 80232434:scissor_timer_main
1422
+ // 8023259C:scissor_timer_get
1423
+ // 802325F8:star_disp2D_sub
1424
+ // 802327A0:star_disp2D
1425
+ // 80232810:star_control
1426
+ // 80232CAC:weaponGetPower_Scissor
1427
+ // 80232D38:tess
1428
+ // 80232F84:scissor_tess
1429
+ // 80232FF4:scissor_cross
1430
+ // 80233420:scissor_intersection4
1431
+ // 802334C0:scissor_intersection3
1432
+ // 8023355C:scissor_intersection2
1433
+ // 802335DC:scissor_intersection
1434
+ 80233C34:GetScissorPtr
1435
+
1407
1436
// runtime.c
1408
1437
802648BC:_savefpr_14
1409
1438
802648C0:_savefpr_15
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include < cstdint>
4
+
5
+ namespace ttyd ::sac_scissor {
6
+
7
+ extern " C" {
8
+
9
+ // wait_star_standby
10
+ // star_stone_appear
11
+ // scissor_end
12
+ // scissor_init
13
+ // scissor_disp_region
14
+ // scissor_offscreen
15
+ // scissor_disp_control
16
+ // scissor_capture
17
+ // scissor_ofscreen_ok
18
+ // scissor_damage_sub2
19
+ // scissor_damage_sub
20
+ // scissor_damage
21
+ // scissor_control
22
+ uint32_t scissor_timer_main ();
23
+ // scissor_timer_get
24
+ // star_disp2D_sub
25
+ // star_disp2D
26
+ // star_control
27
+ // weaponGetPower_Scissor
28
+ // tess
29
+ // scissor_tess
30
+ // scissor_cross
31
+ // scissor_intersection4
32
+ // scissor_intersection3
33
+ // scissor_intersection2
34
+ // scissor_intersection
35
+ void *GetScissorPtr ();
36
+
37
+ }
38
+
39
+ }
Original file line number Diff line number Diff line change 12
12
#include < ttyd/evt_sub.h>
13
13
#include < ttyd/mario_pouch.h>
14
14
#include < ttyd/OSCache.h>
15
+ #include < ttyd/sac_scissor.h>
15
16
16
17
#include < cstdio>
17
18
@@ -372,6 +373,27 @@ const char *Mod::getCustomMessage(const char *msgKey)
372
373
return mPFN_msgSearch_trampoline (msgKey);
373
374
}
374
375
376
+ uint32_t Mod::pauseArtAttackTimer ()
377
+ {
378
+ // Prevent the function from running if Y is being held
379
+ if (checkButtonComboEveryFrame (PAD_Y))
380
+ {
381
+ // Make sure the timer is not at 59 or lower, as pausing it then will cause issues
382
+ void *ArtAttackPointer = ttyd::sac_scissor::GetScissorPtr ();
383
+
384
+ int32_t ArtAttackTimer = *reinterpret_cast <int32_t *>(
385
+ reinterpret_cast <uint32_t >(ArtAttackPointer) + 0x104 );
386
+
387
+ if (ArtAttackTimer > 59 )
388
+ {
389
+ return 0 ;
390
+ }
391
+ }
392
+
393
+ // Call original function
394
+ return mPFN_scissor_timer_main_trampoline ();
395
+ }
396
+
375
397
void writeStandardBranch (void *address, void functionStart (), void functionBranchBack())
376
398
{
377
399
void *tempFunctionStart = reinterpret_cast <void *>(functionStart);
Original file line number Diff line number Diff line change 10
10
#include < ttyd/seq_battle.h>
11
11
#include < ttyd/sound.h>
12
12
#include < ttyd/msgdrv.h>
13
+ #include < ttyd/sac_scissor.h>
13
14
#include < ttyd/fontmgr.h>
14
15
#include < ttyd/windowdrv.h>
15
16
#include < ttyd/seq_logo.h>
@@ -79,6 +80,12 @@ void Mod::init()
79
80
{
80
81
return gMod ->getCustomMessage (msgKey);
81
82
});
83
+
84
+ mPFN_scissor_timer_main_trampoline = patch::hookFunction (
85
+ ttyd::sac_scissor::scissor_timer_main, []()
86
+ {
87
+ return gMod ->pauseArtAttackTimer ();
88
+ });
82
89
83
90
// Initialize typesetting early
84
91
ttyd::fontmgr::fontmgrTexSetup ();
You can’t perform that action at this time.
0 commit comments