diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index 329a8ee48..abb40d970 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -687,6 +687,23 @@ void RegisterMirrorModeHandler() { }); } +void UpdatePatchDlist() { + if (CVarGetInteger("gRandomizeShuffleMasterSword", 0) && B_BTN_ITEM == ITEM_NONE) { + ResourceMgr_PatchGfxByName(gLinkAdultHylianShieldSwordAndSheathNearDL, "adultHylianShield", 75, gsSPEndDisplayList()); + ResourceMgr_PatchGfxByName(gLinkAdultMasterSwordAndSheathNearDL, "adultMasterSword", 2, gsSPEndDisplayList()); + } + else { + ResourceMgr_UnpatchGfxByName(gLinkAdultHylianShieldSwordAndSheathNearDL, "adultHylianShield"); + ResourceMgr_UnpatchGfxByName(gLinkAdultMasterSwordAndSheathNearDL, "adultMasterSword"); + } +} + +void RegisterPatchDlistHandler() { + GameInteractor::Instance->RegisterGameHook([](int32_t sceneNum) { + UpdatePatchDlist(); + }); +} + f32 triforcePieceScale; void RegisterTriforceHunt() { @@ -1256,4 +1273,5 @@ void InitMods() { RegisterRandomizedEnemySizes(); RegisterToTMedallions(); NameTag_RegisterHooks(); + RegisterPatchDlistHandler(); } diff --git a/soh/soh/Enhancements/mods.h b/soh/soh/Enhancements/mods.h index 46123f968..8ab7a025f 100644 --- a/soh/soh/Enhancements/mods.h +++ b/soh/soh/Enhancements/mods.h @@ -12,6 +12,7 @@ void UpdateMirrorModeState(int32_t sceneNum); void PatchToTMedallions(); void UpdatePermanentHeartLossState(); void InitMods(); +void UpdatePatchDlist(); #ifdef __cplusplus }