Cheats Menu expansion (#176)

* Added extra cheats; compacted cheats menu

* fixed flag oversight
This commit is contained in:
Ralphie Morell 2022-04-21 18:39:39 -04:00 committed by GitHub
parent ffeb2afcb7
commit f65486d82d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 488 additions and 15 deletions

View file

@ -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++;
}