refactor: use LUS 1.0 RC

Co-authored-by: kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
briaguya
2023-01-17 00:17:49 -05:00
committed by briaguya
parent ab104623a7
commit ba13e6b2c4
863 changed files with 9227 additions and 4416 deletions

View File

@@ -161,7 +161,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
}
sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button;
if (R_DISABLE_INPUT_DISPLAY == 0 && CVar_GetS32("gDebugEnabled", 0)) {
if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger("gDebugEnabled", 0)) {
GameState_DrawInputDisplay(sLastButtonPressed, &newDList);
}
@@ -333,21 +333,21 @@ void GameState_Update(GameState* gameState) {
// -----------------------
// Inf Money
if (CVar_GetS32("gInfiniteMoney", 0) != 0) {
if (CVarGetInteger("gInfiniteMoney", 0) != 0) {
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET);
}
}
// Inf Health
if (CVar_GetS32("gInfiniteHealth", 0) != 0) {
if (CVarGetInteger("gInfiniteHealth", 0) != 0) {
if (gSaveContext.health < gSaveContext.healthCapacity) {
gSaveContext.health = gSaveContext.healthCapacity;
}
}
// Inf Ammo
if (CVar_GetS32("gInfiniteAmmo", 0) != 0) {
if (CVarGetInteger("gInfiniteAmmo", 0) != 0) {
// Deku Sticks
if (AMMO(ITEM_STICK) < CUR_CAPACITY(UPG_STICKS)) {
AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS);
@@ -380,19 +380,19 @@ void GameState_Update(GameState* gameState) {
}
// Inf Magic
if (CVar_GetS32("gInfiniteMagic", 0) != 0) {
if (CVarGetInteger("gInfiniteMagic", 0) != 0) {
if (gSaveContext.isMagicAcquired && gSaveContext.magic != (gSaveContext.isDoubleMagicAcquired + 1) * 0x30) {
gSaveContext.magic = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30;
}
}
// Inf Nayru's Love Timer
if (CVar_GetS32("gInfiniteNayru", 0) != 0) {
if (CVarGetInteger("gInfiniteNayru", 0) != 0) {
gSaveContext.nayrusLoveTimer = 0x44B;
}
// Moon Jump On L
if (CVar_GetS32("gMoonJumpOnL", 0) != 0) {
if (CVarGetInteger("gMoonJumpOnL", 0) != 0) {
if (gPlayState) {
Player* player = GET_PLAYER(gPlayState);
@@ -403,7 +403,7 @@ void GameState_Update(GameState* gameState) {
}
// Permanent infinite sword glitch (ISG)
if (CVar_GetS32("gEzISG", 0) != 0) {
if (CVarGetInteger("gEzISG", 0) != 0) {
if (gPlayState) {
Player* player = GET_PLAYER(gPlayState);
player->swordState = 1;
@@ -411,7 +411,7 @@ void GameState_Update(GameState* gameState) {
}
// Unrestricted Items
if (CVar_GetS32("gNoRestrictItems", 0) != 0) {
if (CVarGetInteger("gNoRestrictItems", 0) != 0) {
if (gPlayState) {
u8 sunsBackup = gPlayState->interfaceCtx.restrictions.sunsSong;
memset(&gPlayState->interfaceCtx.restrictions, 0, sizeof(gPlayState->interfaceCtx.restrictions));
@@ -420,20 +420,20 @@ void GameState_Update(GameState* gameState) {
}
// Freeze Time
if (CVar_GetS32("gFreezeTime", 0) != 0) {
if (CVar_GetS32("gPrevTime", -1) == -1) {
CVar_SetS32("gPrevTime", gSaveContext.dayTime);
if (CVarGetInteger("gFreezeTime", 0) != 0) {
if (CVarGetInteger("gPrevTime", -1) == -1) {
CVarSetInteger("gPrevTime", gSaveContext.dayTime);
}
int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
int32_t prevTime = CVarGetInteger("gPrevTime", gSaveContext.dayTime);
gSaveContext.dayTime = prevTime;
} else {
CVar_SetS32("gPrevTime", -1);
CVarSetInteger("gPrevTime", -1);
}
//Switches Link's age and respawns him at the last entrance he entered.
if (CVar_GetS32("gSwitchAge", 0) != 0) {
CVar_SetS32("gSwitchAge", 0);
if (CVarGetInteger("gSwitchAge", 0) != 0) {
CVarSetInteger("gSwitchAge", 0);
if (gPlayState) {
playerPos = GET_PLAYER(gPlayState)->actor.world.pos;
playerYaw = GET_PLAYER(gPlayState)->actor.shape.rot.y;
@@ -458,7 +458,7 @@ void GameState_Update(GameState* gameState) {
}
}
gSaveContext.language = CVar_GetS32("gLanguages", LANGUAGE_ENG);
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
gameState->frames++;
}