diff options
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/padmgr.c | 6 | ||||
| -rw-r--r-- | soh/src/code/z_parameter.c | 25 | ||||
| -rw-r--r-- | soh/src/code/z_player_lib.c | 4 |
3 files changed, 14 insertions, 21 deletions
diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index c79bbfe16..cb56cb806 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -1,7 +1,7 @@ #include "global.h" #include "vt.h" -#include "soh/Enhancements/debugconsole.h" +#include "soh/Enhancements/game-interactor/GameInteractor.h" //#include <string.h> @@ -229,11 +229,11 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) { case 0: input->cur = *padnow1; - if (chaosEffectNoZ) { + if (GameInteractor_DisableZTargetingActive()) { input->cur.button &= ~(BTN_Z); } - if (chaosEffectReverseControls) { + if (GameInteractor_ReverseControlsActive()) { if (input->cur.stick_x == -128) { input->cur.stick_x = 127; } else { diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index c7ec3b46f..167716ccd 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -13,7 +13,7 @@ #include <assert.h> #endif -#include "soh/Enhancements/debugconsole.h" +#include "soh/Enhancements/game-interactor/GameInteractor.h" static uint16_t _doActionTexWidth, _doActionTexHeight = -1; @@ -939,7 +939,7 @@ void func_80083108(PlayState* play) { Interface_ChangeAlpha(50); } } else if (msgCtx->msgMode == MSGMODE_NONE) { - if (chaosEffectPacifistMode) { + if (GameInteractor_PacifistModeActive()) { gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] = gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] = gSaveContext.buttonStatus[8] = BTN_DISABLED; @@ -3074,7 +3074,7 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange) { } // If one-hit ko mode is on, any damage kills you and you cannot gain health. - if (chaosEffectOneHitKO) { + if (GameInteractor_OneHitKOActive()) { if (healthChange < 0) { gSaveContext.health = 0; } @@ -3091,11 +3091,12 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange) { } // clang-format on - if (chaosEffectDefenseModifier != 0 && healthChange < 0) { - if (chaosEffectDefenseModifier > 0) { - healthChange /= chaosEffectDefenseModifier; + int32_t giDefenseModifier = GameInteractor_DefenseModifier(); + if (giDefenseModifier != 0 && healthChange < 0) { + if (giDefenseModifier > 0) { + healthChange /= giDefenseModifier; } else { - healthChange *= abs(chaosEffectDefenseModifier); + healthChange *= abs(giDefenseModifier); } } @@ -3129,14 +3130,6 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange) { } } -void Health_GiveHearts(s16 hearts) { - gSaveContext.healthCapacity += hearts * 0x10; -} - -void Health_RemoveHearts(s16 hearts) { - gSaveContext.healthCapacity -= hearts * 0x10; -} - void Rupees_ChangeBy(s16 rupeeChange) { gSaveContext.rupeeAccumulator += rupeeChange; @@ -4968,7 +4961,7 @@ void Interface_Draw(PlayState* play) { s16 svar6; bool fullUi = !CVarGetInteger("gMinimalUI", 0) || !R_MINIMAP_DISABLED || play->pauseCtx.state != 0; - if (chaosEffectNoUI) { + if (GameInteractor_NoUIActive()) { return; } diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 6569c2a5c..da7dff3e5 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -6,7 +6,7 @@ #include "objects/object_triforce_spot/object_triforce_spot.h" #include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" -#include "soh/Enhancements/debugconsole.h" +#include "soh/Enhancements/game-interactor/GameInteractor.h" typedef struct { /* 0x00 */ u8 flag; @@ -1050,7 +1050,7 @@ s32 func_80090014(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s } } - if (chaosEffectInvisibleLink) { + if (GameInteractor_InvisibleLinkActive()) { this->actor.shape.shadowDraw = NULL; *dList = NULL; } |
