1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-10 19:13:42 +00:00

Use PLAYER_STR_* to compare to CUR_UPG_VALUE(UPG_STRENGTH)

This commit is contained in:
Dragorn421 2021-09-28 10:33:49 +02:00
parent 10b09e62c1
commit d80bdb32da
No known key found for this signature in database
GPG key ID: C182A3A3996E8201
4 changed files with 6 additions and 6 deletions

View file

@ -88,7 +88,7 @@ u16 func_809FDC38(GlobalContext* globalCtx, Actor* actor) {
if (reaction != 0) { if (reaction != 0) {
return reaction; return reaction;
} }
if (CUR_UPG_VALUE(UPG_STRENGTH)) { if (CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE) {
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) { if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
return 0x301E; return 0x301E;
} else { } else {
@ -487,7 +487,7 @@ void func_809FEB08(EnDu* this, GlobalContext* globalCtx) {
EnDu_SetupAction(this, func_809FE3C0); EnDu_SetupAction(this, func_809FE3C0);
return; return;
} }
if (CUR_UPG_VALUE(UPG_STRENGTH) <= 0) { if (CUR_UPG_VALUE(UPG_STRENGTH) <= PLAYER_STR_NONE) {
this->actor.textId = 0x301C; this->actor.textId = 0x301C;
EnDu_SetupAction(this, func_809FEC14); EnDu_SetupAction(this, func_809FEC14);
} else { } else {

View file

@ -261,7 +261,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
switch (thisx->textId) { switch (thisx->textId) {
case 0x300A: case 0x300A:
if (globalCtx->msgCtx.choiceIndex == 0) { 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; thisx->textId = 0x300B;
} else { } else {
thisx->textId = 0x300C; thisx->textId = 0x300C;

View file

@ -358,7 +358,7 @@ s16 EnGo2_GetStateGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
// Ask question to DMT Goron by bomb flower // Ask question to DMT Goron by bomb flower
if (this->actor.textId == 0x300A) { if (this->actor.textId == 0x300A) {
if (globalCtx->msgCtx.choiceIndex == 0) { 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 { } else {
this->actor.textId = 0x300D; this->actor.textId = 0x300D;
} }
@ -456,7 +456,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) { } else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
return 0x3027; return 0x3027;
} else { } else {
return CUR_UPG_VALUE(UPG_STRENGTH) return CUR_UPG_VALUE(UPG_STRENGTH) != PLAYER_STR_NONE
? 0x302C ? 0x302C
: !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017 : gSaveContext.infTable[15] & 0x100 ? 0x3019 : 0x3018; : !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017 : gSaveContext.infTable[15] & 0x100 ? 0x3019 : 0x3018;
} }

View file

@ -513,7 +513,7 @@ void EnOssan_TalkGoronShopkeeper(GlobalContext* globalCtx) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
if (gSaveContext.eventChkInf[2] & 0x20) { if (gSaveContext.eventChkInf[2] & 0x20) {
func_8010B720(globalCtx, 0x3028); 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); func_8010B720(globalCtx, 0x302D);
} else { } else {
func_8010B720(globalCtx, 0x300F); func_8010B720(globalCtx, 0x300F);