From d80bdb32da449edc74e02b8ab3f5a2c532e74bdb Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 28 Sep 2021 10:33:49 +0200 Subject: [PATCH] Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)` --- src/overlays/actors/ovl_En_Du/z_en_du.c | 4 ++-- src/overlays/actors/ovl_En_Go/z_en_go.c | 2 +- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 4 ++-- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index c5a9c86f22..530c658d23 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -88,7 +88,7 @@ u16 func_809FDC38(GlobalContext* globalCtx, Actor* actor) { if (reaction != 0) { return reaction; } - if (CUR_UPG_VALUE(UPG_STRENGTH)) { + if (CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE) { if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) { return 0x301E; } else { @@ -487,7 +487,7 @@ void func_809FEB08(EnDu* this, GlobalContext* globalCtx) { EnDu_SetupAction(this, func_809FE3C0); return; } - if (CUR_UPG_VALUE(UPG_STRENGTH) <= 0) { + if (CUR_UPG_VALUE(UPG_STRENGTH) <= PLAYER_STR_NONE) { this->actor.textId = 0x301C; EnDu_SetupAction(this, func_809FEC14); } else { diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index f42eb5d8b3..f0d84323b8 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -261,7 +261,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) { switch (thisx->textId) { case 0x300A: if (globalCtx->msgCtx.choiceIndex == 0) { - if (CUR_UPG_VALUE(UPG_STRENGTH) || (gSaveContext.infTable[14] & 0x800)) { + if ((CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE) || (gSaveContext.infTable[14] & 0x800)) { thisx->textId = 0x300B; } else { thisx->textId = 0x300C; diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index d7eccc3d2b..8938a0f6c5 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -358,7 +358,7 @@ s16 EnGo2_GetStateGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) { // Ask question to DMT Goron by bomb flower if (this->actor.textId == 0x300A) { if (globalCtx->msgCtx.choiceIndex == 0) { - this->actor.textId = CUR_UPG_VALUE(UPG_STRENGTH) ? 0x300B : 0x300C; + this->actor.textId = CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE ? 0x300B : 0x300C; } else { this->actor.textId = 0x300D; } @@ -456,7 +456,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) { } else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) { return 0x3027; } else { - return CUR_UPG_VALUE(UPG_STRENGTH) + return CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE ? 0x302C : !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017 : gSaveContext.infTable[15] & 0x100 ? 0x3019 : 0x3018; } diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 625d1d0a23..51c2035dc8 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -513,7 +513,7 @@ void EnOssan_TalkGoronShopkeeper(GlobalContext* globalCtx) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) { if (gSaveContext.eventChkInf[2] & 0x20) { func_8010B720(globalCtx, 0x3028); - } else if (CUR_UPG_VALUE(UPG_STRENGTH)) { + } else if (CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE) { func_8010B720(globalCtx, 0x302D); } else { func_8010B720(globalCtx, 0x300F);