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>
This commit is contained in:
Garrett Cox 2024-02-01 20:43:45 -06:00 committed by GitHub
parent c49908caa6
commit ddf0392100
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

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

View File

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