summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorRalphie Morell <rafael.morell@techfield.us>2022-04-21 18:39:39 -0400
committerGitHub <noreply@github.com>2022-04-21 18:39:39 -0400
commitf65486d82dfece3b305697e0fd258cdfaa9c6252 (patch)
tree2b241e4277f5f822320776327bba5bdac8059f08 /soh/src/code
parentffeb2afcb758ecb024dc4af2ebcb6ac528ae3bdb (diff)
Cheats Menu expansion (#176)
* Added extra cheats; compacted cheats menu * fixed flag oversight
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/game.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/soh/src/code/game.c b/soh/src/code/game.c
index 9392cbc25..b69537fd8 100644
--- a/soh/src/code/game.c
+++ b/soh/src/code/game.c
@@ -381,6 +381,11 @@ void GameState_Update(GameState* gameState) {
gSaveContext.magic = (gSaveContext.doubleMagic + 1) * 0x30;
}
}
+
+ // Inf Nayru's Love Timer
+ if (CVar_GetS32("gInfiniteNayru", 0) != 0) {
+ gSaveContext.nayrusLoveTimer = 0x44B;
+ }
// Moon Jump On L
if (CVar_GetS32("gMoonJumpOnL", 0) != 0) {
@@ -393,6 +398,32 @@ void GameState_Update(GameState* gameState) {
}
}
+ // Permanent infinite sword glitch (ISG)
+ if (CVar_GetS32("gEzISG", 0) != 0) {
+ if (gGlobalCtx) {
+ Player* player = GET_PLAYER(gGlobalCtx);
+ player->swordState = 1;
+ }
+ }
+
+ // Unrestricted Items
+ if (CVar_GetS32("gNoRestrictItems", 0) != 0) {
+ if (gGlobalCtx) {
+ memset(&gGlobalCtx->interfaceCtx.restrictions, 0, sizeof(gGlobalCtx->interfaceCtx.restrictions));
+ }
+ }
+
+ // Freeze Time
+ if (CVar_GetS32("gFreezeTime", 0) != 0) {
+ if (CVar_GetS32("gPrevTime", -1) == -1) {
+ CVar_SetS32("gPrevTime", gSaveContext.dayTime);
+ }
+
+ int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
+ gSaveContext.dayTime = prevTime;
+ }
+
+
gameState->frames++;
}