7
7
#include " patch.h"
8
8
9
9
#include < ttyd/item_data.h>
10
+ #include < ttyd/mariost.h>
10
11
#include < ttyd/system.h>
11
12
#include < ttyd/mario.h>
12
13
#include < ttyd/evtmgr.h>
21
22
#include < ttyd/win_main.h>
22
23
#include < ttyd/itemdrv.h>
23
24
#include < ttyd/battle_ac.h>
24
- #include < ttyd/mariost.h>
25
25
26
+ #include < cstring>
26
27
#include < cstdio>
27
28
#include < cinttypes>
28
29
#include < cmath>
@@ -246,7 +247,7 @@ void loadMarioAndPartnerPositions()
246
247
247
248
void saveAnywhere ()
248
249
{
249
- uint32_t SystemLevel = getSystemLevel ();
250
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
250
251
if (!SaveAnywhere.ScriptIsRunning )
251
252
{
252
253
if (!Cheat[SAVE_ANYWHERE].Active || MenuVar.ChangingCheatButtonCombo )
@@ -269,7 +270,7 @@ void saveAnywhere()
269
270
#endif
270
271
271
272
// Take away control from the player and start the Save script
272
- setSystemLevel (SystemLevel + 1 );
273
+ ttyd::mariost::marioStSystemLevel (SystemLevel + 1 );
273
274
274
275
uint32_t SaveScriptEvtEntry = reinterpret_cast <uint32_t >(ttyd::evtmgr::evtEntryType (SaveScript, 0 , 0 , 0 ));
275
276
SaveAnywhere.ThreadID = *reinterpret_cast <uint32_t *>(SaveScriptEvtEntry + 0x15C );
@@ -298,7 +299,7 @@ void saveAnywhere()
298
299
// Only lower the system level if it's not currently at 0
299
300
if (SystemLevel > 0 )
300
301
{
301
- setSystemLevel (SystemLevel - 1 );
302
+ ttyd::mariost::marioStSystemLevel (SystemLevel - 1 );
302
303
}
303
304
}
304
305
}
@@ -428,10 +429,10 @@ void checkIfSystemLevelShouldBeLowered()
428
429
if (!checkForSpecificSeq (ttyd::seqdrv::SeqIndex::kGame ))
429
430
{
430
431
// Only lower the system level if it's not currently at 0
431
- uint32_t SystemLevel = getSystemLevel ();
432
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
432
433
if (SystemLevel > 0 )
433
434
{
434
- setSystemLevel (0 );
435
+ ttyd::mariost::marioStSystemLevel (0 );
435
436
}
436
437
}
437
438
else
@@ -479,15 +480,15 @@ void reloadRoomMain()
479
480
char *tempNewBero = ReloadRoom.NewBero ;
480
481
char *tempNewMap = ReloadRoom.NewMap ;
481
482
482
- copyString (tempNewBero, ttyd::seq_mapchange::NextBero);
483
- copyString (tempNewMap, ttyd::seq_mapchange::NextMap);
483
+ strcpy (tempNewBero, ttyd::seq_mapchange::NextBero);
484
+ strcpy (tempNewMap, ttyd::seq_mapchange::NextMap);
484
485
setSeqMapChange (tempNewMap, tempNewBero);
485
486
486
487
// Reset the camera - mainly for the black bars at the top and bottom of the screen
487
488
uint32_t CameraPointer = reinterpret_cast <uint32_t >(ttyd::camdrv::camGetPtr (8 ));
488
489
*reinterpret_cast <uint16_t *>(CameraPointer) &= ~((1 << 8 ) | (1 << 9 )); // Turn off the 8 and 9 bits
489
490
490
- uint32_t SystemLevel = getSystemLevel ();
491
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
491
492
if (SystemLevel == 0 )
492
493
{
493
494
return ;
@@ -503,7 +504,7 @@ void reloadRoomMain()
503
504
// Enable sound effects, set the default camera id for Mario, and give back control to the player
504
505
ttyd::pmario_sound::psndClearFlag (0x80 );
505
506
ttyd::mario_cam::marioSetCamId (4 );
506
- setSystemLevel (0 );
507
+ ttyd::mariost::marioStSystemLevel (0 );
507
508
ReloadRoom.SystemLevelShouldBeLowered = true ;
508
509
}
509
510
@@ -638,7 +639,7 @@ void spawnItem()
638
639
bool tempInAdjustableValueMenu = SpawnItem.InAdjustableValueMenu ;
639
640
if (Cheat[SPAWN_ITEM].Active && !MenuVar.ChangingCheatButtonCombo )
640
641
{
641
- uint32_t SystemLevel = getSystemLevel ();
642
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
642
643
if (checkIfInGame () && (SystemLevel != 15 ))
643
644
{
644
645
// Currently not in a battle and the pause menu is not open
@@ -825,7 +826,7 @@ void getStickAngleString(char *stringOut)
825
826
if (StickAngle == -1000 )
826
827
{
827
828
// The stick is currently at the neutral position
828
- copyString (stringOut, " Neutral" );
829
+ strcpy (stringOut, " Neutral" );
829
830
return ;
830
831
}
831
832
@@ -838,7 +839,7 @@ void getStickAngleString(char *stringOut)
838
839
839
840
void displaySequenceInPauseMenu ()
840
841
{
841
- uint32_t SystemLevel = getSystemLevel ();
842
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
842
843
if (SystemLevel != 15 )
843
844
{
844
845
return ;
@@ -1048,7 +1049,7 @@ void displayPalaceSkipDetails()
1048
1049
return ;
1049
1050
}
1050
1051
1051
- uint32_t SystemLevel = getSystemLevel ();
1052
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
1052
1053
if (SystemLevel == 15 )
1053
1054
{
1054
1055
// Stop upon pausing
@@ -1097,7 +1098,7 @@ void displayBlimpTicketSkipDetails()
1097
1098
return ;
1098
1099
}
1099
1100
1100
- uint32_t SystemLevel = getSystemLevel ();
1101
+ uint32_t SystemLevel = ttyd::mariost::marioStGetSystemLevel ();
1101
1102
if (SystemLevel == 15 )
1102
1103
{
1103
1104
// Stop upon pausing
@@ -1471,7 +1472,7 @@ uint32_t Mod::setIndexWarpEntrance(void *event, uint32_t waitMode)
1471
1472
reinterpret_cast <uint32_t >(
1472
1473
ttyd::mariost::globalWorkPointer) + 0x11C );
1473
1474
1474
- copyString (NextBeroGSW, ChosenEntranceName);
1475
+ strcpy (NextBeroGSW, ChosenEntranceName);
1475
1476
setNextBero (ChosenEntranceName);
1476
1477
}
1477
1478
0 commit comments