1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +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) {
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 {

View file

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

View file

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

View file

@ -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);