From 42a5f46e5e63323c201c6c9cb55a22a98e037300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaro=20Mart=C3=ADnez?= Date: Thu, 13 Oct 2022 08:46:58 -0500 Subject: [PATCH] Fix Gerudo Warrior Clothing (#1752) * Fix Gerudo Warrior Clothing * Update soh/soh/GameMenuBar.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> --- soh/soh/GameMenuBar.cpp | 4 ++ soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 42 ++++++++++--------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index df6af83ad..74f39c079 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -298,6 +298,8 @@ namespace GameMenuBar { CVar_SetS32("gCrouchStabHammerFix", 0); // Fix all crouch stab CVar_SetS32("gCrouchStabFix", 0); + // Fix Gerudo Warrior's clothing colors + CVar_SetS32("gGerudoWarriorClothingFix", 0); // Red Ganon blood CVar_SetS32("gRedGanonBlood", 0); @@ -1078,6 +1080,8 @@ namespace GameMenuBar { UIWidgets::PaddedEnhancementCheckbox("Remove power crouch stab", "gCrouchStabFix", true, false); UIWidgets::Tooltip("Make crouch stabbing always do the same damage as a regular slash"); } + UIWidgets::PaddedEnhancementCheckbox("Fix Gerudo Warrior's clothing colors", "gGerudoWarriorClothingFix", true, false); + UIWidgets::Tooltip("Prevent the Gerudo Warrior's clothes changing color when changing Link's tunic or using bombs in front of her"); ImGui::EndMenu(); } diff --git a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 261ce49ec..e646a95cd 100644 --- a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -249,28 +249,30 @@ s32 EnGe3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, case GELDB_LIMB_HEAD: rot->x += this->headRot.y; - // This is a hack to fix the color-changing clothes this Gerudo has on N64 versions default: - OPEN_DISPS(globalCtx->state.gfxCtx); - switch (limbIndex) { - case GELDB_LIMB_NECK: - break; - case GELDB_LIMB_HEAD: - gDPPipeSync(POLY_OPA_DISP++); - gDPSetEnvColor(POLY_OPA_DISP++, 80, 60, 10, 255); - break; - case GELDB_LIMB_R_SWORD: - case GELDB_LIMB_L_SWORD: - gDPPipeSync(POLY_OPA_DISP++); - gDPSetEnvColor(POLY_OPA_DISP++, 140, 170, 230, 255); - gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); - break; - default: - gDPPipeSync(POLY_OPA_DISP++); - gDPSetEnvColor(POLY_OPA_DISP++, 140, 0, 0, 255); - break; + if (CVar_GetS32("gGerudoWarriorClothingFix", 0)) { + // This is a hack to fix the color-changing clothes this Gerudo has on N64 versions + OPEN_DISPS(globalCtx->state.gfxCtx); + switch (limbIndex) { + case GELDB_LIMB_NECK: + break; + case GELDB_LIMB_HEAD: + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 80, 60, 10, 255); + break; + case GELDB_LIMB_R_SWORD: + case GELDB_LIMB_L_SWORD: + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 140, 170, 230, 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); + break; + default: + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 140, 0, 0, 255); + break; + } + CLOSE_DISPS(globalCtx->state.gfxCtx); } - CLOSE_DISPS(globalCtx->state.gfxCtx); break; } return false;