Skip to content

Commit

Permalink
update cvars
Browse files Browse the repository at this point in the history
  • Loading branch information
inspectredc committed Jul 18, 2024
1 parent ac1f438 commit a047745
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion soh/soh/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Restore a bug from NTSC 1.0 that allows bypassing Bongo Bongo's intro cutscene to quickly kill him");
UIWidgets::PaddedEnhancementCheckbox("Original RBA Values", CVAR_ENHANCEMENT("RestoreRBAValues"), true, false);
UIWidgets::Tooltip("Restores the original outcomes when performing Reverse Bottle Adventure.");
UIWidgets::PaddedEnhancementCheckbox("Early Eyeball Frog", "gRestorations.EarlyEyeballFrog", true, false);
UIWidgets::PaddedEnhancementCheckbox("Early Eyeball Frog", CVAR_ENHANCEMENT("EarlyEyeballFrog"), true, false);
UIWidgets::Tooltip("Restores a bug from NTSC 1.0/1.1 that allows you to obtain the eyeball frog from King Zora instead of the Zora Tunic by holding shield.");

ImGui::EndMenu();
Expand Down
22 changes: 11 additions & 11 deletions soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ s16 func_80A9C6C0(PlayState* play, Actor* thisx) {

switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_DONE:
if (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
if (Message_ShouldAdvance(play)) {
ret = NPC_TALK_STATE_ITEM_GIVEN;
}
Expand All @@ -149,7 +149,7 @@ s16 func_80A9C6C0(PlayState* play, Actor* thisx) {
}
break;
case TEXT_STATE_CLOSING:
if (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
ret = NPC_TALK_STATE_IDLE;
switch (this->actor.textId) {
case 0x4012:
Expand Down Expand Up @@ -182,8 +182,8 @@ s16 func_80A9C6C0(PlayState* play, Actor* thisx) {
break;
}
if (this->actor.textId == 0x4014) {
if (play->msgCtx.choiceIndex == 0 && (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0) && this->actor.textId == 0x4014)) {
if (!CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (play->msgCtx.choiceIndex == 0 && (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0) && this->actor.textId == 0x4014)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
EnKz_SetupGetItem(this, play);
}
ret = NPC_TALK_STATE_ACTION;
Expand Down Expand Up @@ -231,7 +231,7 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* talkState, f32 unkf, NpcGetT
return 1;
}

if (!CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
if (*talkState != NPC_TALK_STATE_IDLE) {
*talkState = updateTalkState(play, &this->actor);
return 0;
Expand All @@ -252,7 +252,7 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* talkState, f32 unkf, NpcGetT
return 0;
}

if (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
if (*talkState != NPC_TALK_STATE_IDLE) {
*talkState = updateTalkState(play, &this->actor);
return 0;
Expand All @@ -274,7 +274,7 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* talkState, f32 unkf, NpcGetT
void func_80A9CB18(EnKz* this, PlayState* play) {
Player* player = GET_PLAYER(play);

if (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
f32 yaw;
yaw = Math_Vec3f_Yaw(&this->actor.home.pos, &player->actor.world.pos);
yaw -= this->actor.shape.rot.y;
Expand Down Expand Up @@ -307,13 +307,13 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
this->actor.textId = 0x4014;
this->sfxPlayed = false;
player->actor.textId = this->actor.textId;
if (!CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
this->isTrading = true;
}
return;
}
}
if (!CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
this->isTrading = false;
}
if (Flags_GetInfTable(INFTABLE_139)) {
Expand Down Expand Up @@ -482,7 +482,7 @@ void EnKz_StopMweep(EnKz* this, PlayState* play) {

void EnKz_Wait(EnKz* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
if (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
}
this->actionFunc = EnKz_SetupGetItem;
Expand Down Expand Up @@ -511,7 +511,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_ZD_TRADE_PRESCRIPTION);
}
} else {
if (CVarGetInteger("gRestorations.EarlyEyeballFrog", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 0)) {
getItemId = func_8002F368(play) == EXCH_ITEM_PRESCRIPTION ? GI_FROG : GI_TUNIC_ZORA;
} else {
getItemId = this->isTrading ? GI_FROG : GI_TUNIC_ZORA;
Expand Down

0 comments on commit a047745

Please sign in to comment.