From ddf039210085297d0ce035637afda169c3ac008d Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Thu, 1 Feb 2024 20:43:45 -0600 Subject: [PATCH] Add gShowDoorLocksOnBothSides (#3787) * Add gShowDoorLocksOnBothSides * Update soh/src/overlays/actors/ovl_En_Door/z_en_door.c --------- Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> --- soh/soh/SohMenuBar.cpp | 1 + soh/src/overlays/actors/ovl_En_Door/z_en_door.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index c0aae7a5e..a10eb6201 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -1103,6 +1103,7 @@ void DrawEnhancementsMenu() { PatchToTMedallions(); } UIWidgets::Tooltip("When medallions are collected, the medallion imprints around the Master Sword pedestal in the Temple of Time will become colored"); + UIWidgets::PaddedEnhancementCheckbox("Show locked door chains on both sides of locked doors", "gShowDoorLocksOnBothSides", true, false); UIWidgets::PaddedText("Fix Vanishing Paths", true, false); if (UIWidgets::EnhancementCombobox("gSceneSpecificDirtPathFix", zFightingOptions, ZFIGHT_FIX_DISABLED) && gPlayState != NULL) { UpdateDirtPathFixState(gPlayState->sceneNum); diff --git a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c index f0442821a..329462c06 100644 --- a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -349,7 +349,15 @@ void EnDoor_Draw(Actor* thisx, PlayState* play) { } } if (this->lockTimer != 0) { + if (CVarGetInteger("gShowDoorLocksOnBothSides", 0)) { + Matrix_Push(); + } Actor_DrawDoorLock(play, this->lockTimer, DOORLOCK_NORMAL); + if (CVarGetInteger("gShowDoorLocksOnBothSides", 0)) { + Matrix_Pop(); + Matrix_RotateZYX(0, 0x8000, 0, MTXMODE_APPLY); + Actor_DrawDoorLock(play, this->lockTimer, DOORLOCK_NORMAL); + } } CLOSE_DISPS(play->state.gfxCtx);