From 8d3adb4c6fc7e3e2e0c1d3b8d22a26f3432c1f18 Mon Sep 17 00:00:00 2001 From: aMannus Date: Fri, 15 Sep 2023 04:51:38 +0200 Subject: [PATCH] Rotation options for bombs and grottos (#3146) Co-authored-by: Garrett Cox --- soh/soh/SohMenuBar.cpp | 13 +++++++++++-- soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c | 6 ++++-- soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c | 4 +++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index 245aed98f..2a49d752a 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -878,8 +878,17 @@ void DrawEnhancementsMenu() { if (ImGui::BeginMenu("Graphics")) { - if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", "gAltAssets", true, false)) { - ShouldClearTextureCacheAtEndOfFrame = true; + if (ImGui::BeginMenu("Mods")) { + if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", "gAltAssets", false, false)) { + ShouldClearTextureCacheAtEndOfFrame = true; + } + UIWidgets::Tooltip("Toggle between standard assets and alternate assets. Usually mods will indicate if this setting has to be used or not."); + UIWidgets::PaddedEnhancementCheckbox("Disable Bomb Billboarding", "gDisableBombBillboarding", true, false); + UIWidgets::Tooltip("Disables bombs always rotating to face the camera. To be used in conjunction with mods that want to replace bombs with 3D objects."); + UIWidgets::PaddedEnhancementCheckbox("Disable Grotto Fixed Rotation", "gDisableGrottoRotation", true, false); + UIWidgets::Tooltip("Disables grottos rotating with the camera. To be used in conjunction with mods that want to replace grottos with 3D objects."); + + ImGui::EndMenu(); } UIWidgets::PaddedEnhancementCheckbox("Disable LOD", "gDisableLOD", true, false); UIWidgets::Tooltip("Turns off the Level of Detail setting, making models use their higher-poly variants at any distance"); diff --git a/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index d95c85b02..917959e2f 100644 --- a/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -180,8 +180,10 @@ void DoorAna_Update(Actor* thisx, PlayState* play) { DoorAna* this = (DoorAna*)thisx; this->actionFunc(this, play); - // changes the grottos facing angle based on camera angle - this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000; + // Changes the grottos facing angle based on camera angle + if (!CVarGetInteger("gDisableGrottoRotation", 0)) { + this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000; + } } void DoorAna_Draw(Actor* thisx, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 7632cda23..40adc1a6f 100644 --- a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -397,7 +397,9 @@ void EnBom_Draw(Actor* thisx, PlayState* play) { if (thisx->params == BOMB_BODY) { Gfx_SetupDL_25Opa(play->state.gfxCtx); - Matrix_ReplaceRotation(&play->billboardMtxF); + if (!CVarGetInteger("gDisableBombBillboarding", 0)) { + Matrix_ReplaceRotation(&play->billboardMtxF); + } func_8002EBCC(thisx, play, 0); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);