From eb081dc719a79b845b72bb7519d8a903fe10f3db Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Sun, 9 Oct 2022 01:38:25 -0500 Subject: [PATCH 01/14] Add fix for ice traps while wearing bunny hood (#1713) --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index d796749a5..4a2d036c3 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -10966,6 +10966,8 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c this); if ((overrideLimbDraw == func_80090014) && (this->currentMask != PLAYER_MASK_NONE)) { + // Fixes a bug in vanilla where ice traps are rendered extremely large while wearing a bunny hood + if (CVar_GetS32("gFixIceTrapWithBunnyHood", 1)) Matrix_Push(); Mtx* sp70 = Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Mtx)); if (this->currentMask == PLAYER_MASK_BUNNY) { @@ -10987,6 +10989,7 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c } gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]); + if (CVar_GetS32("gFixIceTrapWithBunnyHood", 1)) Matrix_Pop(); } if ((this->currentBoots == PLAYER_BOOTS_HOVER) && !(this->actor.bgCheckFlags & 1) && From b310d675f1222e5bdc2828e3c6baef2829bf6bbc Mon Sep 17 00:00:00 2001 From: Andrew Van Caem Date: Sun, 9 Oct 2022 17:46:11 +1100 Subject: [PATCH 02/14] Corrected inf entry label for Fado (#1711) --- soh/soh/Enhancements/debugger/debugSaveEditor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h index e51414f4c..488ec3ea6 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.h +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -241,7 +241,7 @@ const std::vector flagTables = { { 0xB7, "Spoke to Fado in Kokiri Forest as Child" }, { 0xB8, "Spoke to Malon After Saving Ranch" }, { 0xB9, "Spoke to Malon on Horseback" }, - { 0xBC, "Spoke to Carpenter Boss by Tent" }, + { 0xBC, "Fado requested Odd Potion" }, { 0xC0, "Spoke to Fat Woman by Market Potion Shop" }, { 0xC1, "Spoke to Fat Woman After Zelda's Escape" }, { 0xC2, "Spoke to Burly Man About Talon Search" }, From 18208cc993406095cb41b798185afe26d5c1f464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaro=20Mart=C3=ADnez?= Date: Mon, 10 Oct 2022 01:26:40 -0500 Subject: [PATCH 03/14] Fix A cursor color in the Continue prompt (#1717) --- .../misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index ee0b5c179..cf145b474 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -1134,6 +1134,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) { static s16 D_8082AD48 = 0; static s16 D_8082AD4C = 0; static s16 D_8082AD50 = 0; + const Color_RGB8 A_cursor = CVar_GetRGB("gCCABtnPrim", A_BTN_ori); PauseContext* pauseCtx = &globalCtx->pauseCtx; Input* input = &globalCtx->state.input[0]; s16 stepR; @@ -1508,7 +1509,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) { } else if (CVar_GetS32("gHudColors", 1) == 1) { gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61)); } else if (CVar_GetS32("gHudColors", 1) == 2) { - gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, CVar_GetRGB("gCCABtnPrim", A_BTN_ori).r, CVar_GetRGB("gCCABtnPrim", A_BTN_ori).g, CVar_GetRGB("gCCABtnPrim", A_BTN_ori).b, VREG(61)); //Save prompt cursor colour + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_cursor.r, A_cursor.g, A_cursor.b, VREG(61)); //Save prompt cursor colour } if (pauseCtx->promptChoice == 0) { @@ -1533,7 +1534,13 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) { gDPSetCombineLERP(POLY_KAL_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61)); + if (CVar_GetS32("gHudColors", 1) == 0) { //Continue prompt cursor colour + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 100, 255, VREG(61)); + } else if (CVar_GetS32("gHudColors", 1) == 1) { + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61)); + } else if (CVar_GetS32("gHudColors", 1) == 2) { + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_cursor.r, A_cursor.g, A_cursor.b, VREG(61)); //Continue prompt cursor colour + } if (pauseCtx->promptChoice == 0) { gSPDisplayList(POLY_KAL_DISP++, gPromptCursorLeftDL); From aa00cba76e86148988b9089f501470a16b35384e Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Mon, 10 Oct 2022 01:27:22 -0500 Subject: [PATCH 04/14] [#1718] Fix interpolation issue with bunny hood ears (#1724) --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 4a2d036c3..515afb71c 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -10973,6 +10973,7 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c if (this->currentMask == PLAYER_MASK_BUNNY) { Vec3s sp68; + FrameInterpolation_RecordActorPosRotMatrix(); gSPSegment(POLY_OPA_DISP++, 0x0B, sp70); sp68.x = D_80858AC8.unk_02 + 0x3E2; From fd3872ae3003eb138104be9a3e2a62114c46f857 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Mon, 10 Oct 2022 02:40:52 -0500 Subject: [PATCH 05/14] [#1715] Fix crash when retrieving a merchant message while using fast file select (#1722) --- soh/soh/SaveManager.cpp | 1 + soh/src/overlays/gamestates/ovl_title/z_title.c | 1 + 2 files changed, 2 insertions(+) diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index 80ed3648a..f7ca0c956 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -99,6 +99,7 @@ void SaveManager::LoadRandomizerVersion1() { std::shared_ptr randomizer = OTRGlobals::Instance->gRandomizer; + randomizer->LoadRandomizerSettings(""); size_t merchantPricesSize = 0; if (randomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) > 0) { merchantPricesSize += NUM_SCRUBS; diff --git a/soh/src/overlays/gamestates/ovl_title/z_title.c b/soh/src/overlays/gamestates/ovl_title/z_title.c index 10210a92c..99b05439d 100644 --- a/soh/src/overlays/gamestates/ovl_title/z_title.c +++ b/soh/src/overlays/gamestates/ovl_title/z_title.c @@ -307,6 +307,7 @@ void Title_Init(GameState* thisx) { Randomizer_LoadSettings(""); Randomizer_LoadHintLocations(""); Randomizer_LoadItemLocations("", true); + Randomizer_LoadMerchantMessages(""); gSaveContext.gameMode = 0; gSaveContext.magic = gSaveContext.magic; SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext); From b0510d78f81a00e7b88d2110339d8592007c9ed4 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Mon, 10 Oct 2022 03:16:40 -0500 Subject: [PATCH 06/14] [#1712] Reset fileNum when returning to title screen and prevent saving when file = 0xFF (#1721) --- soh/src/code/z_play.c | 2 +- soh/src/overlays/gamestates/ovl_opening/z_opening.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index f25163c5e..47a6821da 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -2006,7 +2006,7 @@ s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* pos) { } void Gameplay_PerformSave(GlobalContext* globalCtx) { - if (globalCtx != NULL) { + if (globalCtx != NULL && gSaveContext.fileNum != 0xFF) { Gameplay_SaveSceneFlags(globalCtx); gSaveContext.savedSceneNum = globalCtx->sceneNum; if (gSaveContext.temporaryWeapon) { diff --git a/soh/src/overlays/gamestates/ovl_opening/z_opening.c b/soh/src/overlays/gamestates/ovl_opening/z_opening.c index fa8ce9060..3b5beebd7 100644 --- a/soh/src/overlays/gamestates/ovl_opening/z_opening.c +++ b/soh/src/overlays/gamestates/ovl_opening/z_opening.c @@ -10,6 +10,7 @@ void Opening_SetupTitleScreen(OpeningContext* this) { gSaveContext.gameMode = 1; this->state.running = false; gSaveContext.linkAge = 0; + gSaveContext.fileNum = 0xFF; Sram_InitDebugSave(); gSaveContext.cutsceneIndex = 0xFFF3; gSaveContext.sceneSetupIndex = 7; From c00edb928b9c41d7fbda6e58d882e7fd9f07e884 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Mon, 10 Oct 2022 03:19:44 -0500 Subject: [PATCH 07/14] [#1716] Prevent infinite ammo cheat from filling bombchus unless the item is obtained (#1723) --- soh/src/code/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/game.c b/soh/src/code/game.c index 9089606e6..712bc6f2a 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -370,7 +370,7 @@ void GameState_Update(GameState* gameState) { } // Bombchus (max: 50, no upgrades) - if (AMMO(ITEM_BOMBCHU) < 50) { + if (INV_CONTENT(ITEM_BOMBCHU) == ITEM_BOMBCHU && AMMO(ITEM_BOMBCHU) < 50) { AMMO(ITEM_BOMBCHU) = 50; } } From 43b7ca96d7542a6b28cc3306c7c98d7629891fc6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:17:41 +0200 Subject: [PATCH 08/14] Fix Ruto softlock with fast text (fixes #96) (#1732) (#1745) (cherry picked from commit e7ea2a3ae1b3dfae80b66b58d498b89597273360) Co-authored-by: Rozelette --- soh/soh/GameMenuBar.cpp | 2 +- soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 6 ++++-- soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index c74ac8f17..208a8e58a 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -1246,7 +1246,7 @@ namespace GameMenuBar { UIWidgets::Tooltip("The Kokiri are mystical beings that fade into view when approached\nEnabling this will remove their draw distance"); } UIWidgets::PaddedEnhancementCheckbox("Skip Text", "gSkipText", true, false); - UIWidgets::Tooltip("Holding down B skips text\nKnown to cause a cutscene softlock in Water Temple\nSoftlock can be fixed by pressing D-Right in Debug mode"); + UIWidgets::Tooltip("Holding down B skips text"); UIWidgets::PaddedEnhancementCheckbox("Free Camera", "gFreeCamera", true, false); UIWidgets::Tooltip("Enables camera control\nNote: You must remap C buttons off of the right stick in the controller config menu, and map the camera stick to the right stick."); diff --git a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index d822a9448..ea53206f8 100644 --- a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -634,13 +634,13 @@ s32 func_80AF383C(EnRu2* this, GlobalContext* globalCtx) { void func_80AF3878(EnRu2* this, GlobalContext* globalCtx) { if (func_80AF383C(this, globalCtx) && !Gameplay_InCsMode(globalCtx)) { this->action = 16; - OnePointCutscene_Init(globalCtx, 3130, -99, &this->actor, MAIN_CAM); + this->subCamId = OnePointCutscene_Init(globalCtx, 3130, -99, &this->actor, MAIN_CAM); } } void func_80AF38D0(EnRu2* this, GlobalContext* globalCtx) { this->action = 16; - OnePointCutscene_Init(globalCtx, 3130, -99, &this->actor, MAIN_CAM); + this->subCamId = OnePointCutscene_Init(globalCtx, 3130, -99, &this->actor, MAIN_CAM); } void func_80AF390C(EnRu2* this, GlobalContext* globalCtx) { @@ -703,6 +703,7 @@ void func_80AF3ADC(EnRu2* this, GlobalContext* globalCtx) { void func_80AF3B74(EnRu2* this, GlobalContext* globalCtx) { if (this->unk_2C0 > ((((u16)(kREG(3) + 0x28)) + ((u16)(kREG(2) + 0x96))) & 0xFFFF)) { Actor_Kill(&this->actor); + OnePointCutscene_EndCutscene(globalCtx, this->subCamId); } } @@ -789,6 +790,7 @@ void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_2C2 = 0; this->unk_2C3 = TEXT_STATE_DONE_FADING; + this->subCamId = 0; } void func_80AF3F14(EnRu2* this, GlobalContext* globalCtx) { diff --git a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h index bb3865ce6..0b5572cfc 100644 --- a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h +++ b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h @@ -27,6 +27,7 @@ typedef struct EnRu2 { /* 0x02C3 */ u8 unk_2C3; /* 0x02C4 */ f32 unk_2C4; /* 0x02C8 */ ColliderCylinder collider; + /* 0x02C8 */ s16 subCamId; } EnRu2; // size = 0x0314 #endif From 83541f460588b6b596c813625c8d85eeeb47258b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 18:01:06 +0200 Subject: [PATCH 09/14] [#80] Fix for goron spin on wake up animation (#1714) (#1746) --- soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c index db3d5ff56..f10e8412a 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -142,6 +142,7 @@ typedef enum { /* 10 */ ENGO2_ANIM_10, /* 11 */ ENGO2_ANIM_11, /* 12 */ ENGO2_ANIM_12, + /* 13 */ ENGO2_ANIM_13, // Added to fix spinning goron issue for biggoron } EnGo2Animation; static AnimationInfo sAnimationInfo[] = { @@ -151,7 +152,7 @@ static AnimationInfo sAnimationInfo[] = { { &gGoronAnim_002D80, 1.0f, 0.0f, -1.0f, 0x02, -8.0f }, { &gGoronAnim_00161C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_001A00, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_0021D0, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_004930, 0.0f, 0.0f, -1.0f, 0x01, -8.0f }, { &gGoronAnim_000750, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, - { &gGoronAnim_000D5C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, + { &gGoronAnim_000D5C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_004930, 0.0f, 1.0f, -1.0f, 0x01, 0.0f }, }; static EnGo2DustEffectData sDustEffectData[2][4] = { @@ -1357,10 +1358,25 @@ void EnGo2_WakeUp(EnGo2* this, GlobalContext* globalCtx) { } if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, MAIN_CAM); - Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10); + // There is an issue interpolating between ENGO2_ANIM_0 and ENGO2_ANIM_1/10, the goron + // is technically in the same position at the end of ANIM_0 and beginning of ANIM_1/10 + // but something isn't getting translated correctly causing the 360 degree spin before + // then continuing the wake up animation like normal. One solution is to use ANIM_0 + // which uses the same frame data as ANIM_1/10 but no morph frames, but only when the + // current animation frame is at 0, meaning no morphing is necessary anyway. + // ANIM_13 is ANIM_0 but with the startFrame and mode adjusted for biggoron. + if (this->skelAnime.curFrame == 0.0f && !CVar_GetS32("gUnfixGoronSpin", 0)) { + Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_13); + } else { + Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10); + } this->skelAnime.playSpeed = 0.5f; } else { - Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1); + if (this->skelAnime.curFrame == 0.0f && !CVar_GetS32("gUnfixGoronSpin", 0)) { + Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_0); + } else { + Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1); + } this->skelAnime.playSpeed = 1.0f; } this->actionFunc = func_80A46B40; From 63f763a556cdd705ccfbb4c8bb15bb2133afc37a Mon Sep 17 00:00:00 2001 From: Rozelette Date: Tue, 11 Oct 2022 11:58:28 -0500 Subject: [PATCH 10/14] When testing if an animation is new, make sure we are using the loaded file pointers (#1748) --- soh/src/code/z_skelanime.c | 19 ++++++++++--- soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c | 27 ++++++------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/soh/src/code/z_skelanime.c b/soh/src/code/z_skelanime.c index 34e827b18..cc969be45 100644 --- a/soh/src/code/z_skelanime.c +++ b/soh/src/code/z_skelanime.c @@ -1242,8 +1242,12 @@ void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAn if (ResourceMgr_OTRSigCheck(animation) != 0) animation = ResourceMgr_LoadAnimByName(animation); + AnimationHeader* currentAnimation = (AnimationHeader*)skelAnime->animation; + if (ResourceMgr_OTRSigCheck(currentAnimation) != 0) + currentAnimation = ResourceMgr_LoadAnimByName(currentAnimation); + skelAnime->mode = mode; - if ((morphFrames != 0.0f) && ((animation != skelAnime->animation) || (startFrame != skelAnime->curFrame))) { + if ((morphFrames != 0.0f) && ((animation != currentAnimation) || (startFrame != skelAnime->curFrame))) { if (morphFrames < 0) { LinkAnimation_SetUpdateFunction(skelAnime); SkelAnime_CopyFrameTable(skelAnime, skelAnime->morphTable, skelAnime->jointTable); @@ -1687,8 +1691,17 @@ s32 SkelAnime_Once(SkelAnime* skelAnime) { */ void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames, s8 taper) { + LinkAnimationHeader* ogAnim = animation; + + if (ResourceMgr_OTRSigCheck(animation) != 0) + animation = ResourceMgr_LoadAnimByName(animation); + + AnimationHeader* currentAnimation = (AnimationHeader*)skelAnime->animation; + if (ResourceMgr_OTRSigCheck(currentAnimation) != 0) + currentAnimation = ResourceMgr_LoadAnimByName(currentAnimation); + skelAnime->mode = mode; - if ((morphFrames != 0.0f) && ((animation != skelAnime->animation) || (startFrame != skelAnime->curFrame))) { + if ((morphFrames != 0.0f) && ((animation != currentAnimation) || (startFrame != skelAnime->curFrame))) { if (morphFrames < 0) { SkelAnime_SetUpdate(skelAnime); SkelAnime_CopyFrameTable(skelAnime, skelAnime->morphTable, skelAnime->jointTable); @@ -1710,7 +1723,7 @@ void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 skelAnime->morphWeight = 0.0f; } - skelAnime->animation = animation; + skelAnime->animation = ogAnim; skelAnime->startFrame = startFrame; skelAnime->endFrame = endFrame; skelAnime->animLength = Animation_GetLength(animation); diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c index f10e8412a..9190131ff 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -142,7 +142,6 @@ typedef enum { /* 10 */ ENGO2_ANIM_10, /* 11 */ ENGO2_ANIM_11, /* 12 */ ENGO2_ANIM_12, - /* 13 */ ENGO2_ANIM_13, // Added to fix spinning goron issue for biggoron } EnGo2Animation; static AnimationInfo sAnimationInfo[] = { @@ -152,7 +151,7 @@ static AnimationInfo sAnimationInfo[] = { { &gGoronAnim_002D80, 1.0f, 0.0f, -1.0f, 0x02, -8.0f }, { &gGoronAnim_00161C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_001A00, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_0021D0, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_004930, 0.0f, 0.0f, -1.0f, 0x01, -8.0f }, { &gGoronAnim_000750, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, - { &gGoronAnim_000D5C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_004930, 0.0f, 1.0f, -1.0f, 0x01, 0.0f }, + { &gGoronAnim_000D5C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, }; static EnGo2DustEffectData sDustEffectData[2][4] = { @@ -1349,6 +1348,11 @@ void EnGo2_RollingAnimation(EnGo2* this, GlobalContext* globalCtx) { } void EnGo2_WakeUp(EnGo2* this, GlobalContext* globalCtx) { + if (CVar_GetS32("gUnfixGoronSpin", 0)) { + // Trick SkelAnime into thinking the current animation is changing so that it morphs between the same position, + // making the goron do a spin + this->skelAnime.animation = NULL; + } if (this->skelAnime.playSpeed == 0.0f) { if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOLON_WAKE_UP); @@ -1358,25 +1362,10 @@ void EnGo2_WakeUp(EnGo2* this, GlobalContext* globalCtx) { } if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, MAIN_CAM); - // There is an issue interpolating between ENGO2_ANIM_0 and ENGO2_ANIM_1/10, the goron - // is technically in the same position at the end of ANIM_0 and beginning of ANIM_1/10 - // but something isn't getting translated correctly causing the 360 degree spin before - // then continuing the wake up animation like normal. One solution is to use ANIM_0 - // which uses the same frame data as ANIM_1/10 but no morph frames, but only when the - // current animation frame is at 0, meaning no morphing is necessary anyway. - // ANIM_13 is ANIM_0 but with the startFrame and mode adjusted for biggoron. - if (this->skelAnime.curFrame == 0.0f && !CVar_GetS32("gUnfixGoronSpin", 0)) { - Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_13); - } else { - Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10); - } + Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10); this->skelAnime.playSpeed = 0.5f; } else { - if (this->skelAnime.curFrame == 0.0f && !CVar_GetS32("gUnfixGoronSpin", 0)) { - Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_0); - } else { - Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1); - } + Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1); this->skelAnime.playSpeed = 1.0f; } this->actionFunc = func_80A46B40; From da8f80bb2887cb3832c1e53ab4a2302a1dcca3aa Mon Sep 17 00:00:00 2001 From: Rozelette Date: Tue, 11 Oct 2022 13:44:55 -0500 Subject: [PATCH 11/14] Fix endianness, of a sort, of CS lighting command (#1735) --- soh/include/z64cutscene.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/soh/include/z64cutscene.h b/soh/include/z64cutscene.h index 562561a08..3794547b4 100644 --- a/soh/include/z64cutscene.h +++ b/soh/include/z64cutscene.h @@ -38,8 +38,7 @@ typedef struct { } CsCmdBase; // size = 0x6 typedef struct { - /* 0x00 */ u8 unk_00; - /* 0x01 */ u8 setting; + /* 0x00 */ u16 setting; /* 0x02 */ u16 startFrame; /* 0x04 */ u16 endFrame; } CsCmdEnvLighting; // size = 0x6 From 7c7f032e0e09ab0f455682c4832dea4a741a2230 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 13:16:06 +0200 Subject: [PATCH 12/14] Implement G_CCMUX_NOISE (#1731) (#1754) (cherry picked from commit 825af33b6a008f1eb5d6c8ff57859487b502b8c7) Co-authored-by: Rozelette --- libultraship/libultraship/Lib/Fast3D/gfx_cc.h | 3 +- .../Lib/Fast3D/gfx_direct3d_common.cpp | 36 +++++++++--------- .../libultraship/Lib/Fast3D/gfx_opengl.cpp | 38 +++++++++---------- .../libultraship/Lib/Fast3D/gfx_pc.cpp | 3 ++ 4 files changed, 41 insertions(+), 39 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_cc.h b/libultraship/libultraship/Lib/Fast3D/gfx_cc.h index f0a9f2eca..1046ed83a 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_cc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_cc.h @@ -29,7 +29,8 @@ enum { SHADER_TEXEL1, SHADER_TEXEL1A, SHADER_1, - SHADER_COMBINED + SHADER_COMBINED, + SHADER_NOISE }; #define SHADER_OPT_ALPHA (1 << 0) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp index 2c10e6605..dd17af0a0 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp @@ -15,6 +15,8 @@ static void append_line(char *buf, size_t *len, const char *str) { buf[(*len)++] = '\n'; } +#define RAND_NOISE "((random(float3(floor(screenSpace.xy * noise_scale), noise_frame)) + 1.0) / 2.0)" + static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_alpha, bool inputs_have_alpha, bool hint_single_element) { if (!only_alpha) { switch (item) { @@ -41,6 +43,8 @@ static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_ return with_alpha ? "texVal1" : "texVal1.rgb"; case SHADER_COMBINED: return with_alpha ? "texel" : "texel.rgb"; + case SHADER_NOISE: + return with_alpha ? "float4(" RAND_NOISE ", " RAND_NOISE ", " RAND_NOISE ", " RAND_NOISE ")" : "float3(" RAND_NOISE ", " RAND_NOISE ", " RAND_NOISE ")"; } } else { switch (item) { @@ -67,10 +71,14 @@ static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_ return "texVal1.a"; case SHADER_COMBINED: return "texel.a"; + case SHADER_NOISE: + return RAND_NOISE; } } } +#undef RAND_NOISE + static void append_formula(char *buf, size_t *len, const uint8_t c[2][4], bool do_single, bool do_multiply, bool do_mix, bool with_alpha, bool only_alpha, bool opt_alpha) { if (do_single) { append_str(buf, len, shader_item_to_str(c[only_alpha][3], with_alpha, only_alpha, opt_alpha, false)); @@ -106,9 +114,7 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (include_root_signature) { append_str(buf, &len, "#define RS \"RootFlags(ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | DENY_VERTEX_SHADER_ROOT_ACCESS)"); - if (cc_features.opt_alpha && cc_features.opt_noise) { - append_str(buf, &len, ",CBV(b0, visibility = SHADER_VISIBILITY_PIXEL)"); - } + append_str(buf, &len, ",CBV(b0, visibility = SHADER_VISIBILITY_PIXEL)"); if (cc_features.used_textures[0]) { append_str(buf, &len, ",DescriptorTable(SRV(t0), visibility = SHADER_VISIBILITY_PIXEL)"); append_str(buf, &len, ",DescriptorTable(Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL)"); @@ -161,17 +167,15 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f // Constant buffer and random function - if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(buf, &len, "cbuffer PerFrameCB : register(b0) {"); - append_line(buf, &len, " uint noise_frame;"); - append_line(buf, &len, " float noise_scale;"); - append_line(buf, &len, "}"); + append_line(buf, &len, "cbuffer PerFrameCB : register(b0) {"); + append_line(buf, &len, " uint noise_frame;"); + append_line(buf, &len, " float noise_scale;"); + append_line(buf, &len, "}"); - append_line(buf, &len, "float random(in float3 value) {"); - append_line(buf, &len, " float random = dot(value, float3(12.9898, 78.233, 37.719));"); - append_line(buf, &len, " return frac(sin(random) * 143758.5453);"); - append_line(buf, &len, "}"); - } + append_line(buf, &len, "float random(in float3 value) {"); + append_line(buf, &len, " float random = dot(value, float3(12.9898, 78.233, 37.719));"); + append_line(buf, &len, " return frac(sin(random) * 143758.5453);"); + append_line(buf, &len, "}"); // 3 point texture filtering // Original author: ArthurCarvalho @@ -248,11 +252,7 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (include_root_signature) { append_line(buf, &len, "[RootSignature(RS)]"); } - if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(buf, &len, "float4 PSMain(PSInput input, float4 screenSpace : SV_Position) : SV_TARGET {"); - } else { - append_line(buf, &len, "float4 PSMain(PSInput input) : SV_TARGET {"); - } + append_line(buf, &len, "float4 PSMain(PSInput input, float4 screenSpace : SV_Position) : SV_TARGET {"); for (int i = 0; i < 2; i++) { if (cc_features.used_textures[i]) { len += sprintf(buf + len, " float2 tc%d = input.uv%d;\r\n", i, i); diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 7d2428a45..1a7a62885 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -57,7 +57,6 @@ struct ShaderProgram { GLint attrib_locations[16]; uint8_t attrib_sizes[16]; uint8_t num_attribs; - bool used_noise; GLint frame_count_location; GLint noise_scale_location; }; @@ -104,10 +103,8 @@ static void gfx_opengl_vertex_array_set_attribs(struct ShaderProgram *prg) { } static void gfx_opengl_set_uniforms(struct ShaderProgram *prg) { - if (prg->used_noise) { - glUniform1i(prg->frame_count_location, frame_count); - glUniform1f(prg->noise_scale_location, current_noise_scale); - } + glUniform1i(prg->frame_count_location, frame_count); + glUniform1f(prg->noise_scale_location, current_noise_scale); } static void gfx_opengl_unload_shader(struct ShaderProgram *old_prg) { @@ -134,6 +131,8 @@ static void append_line(char *buf, size_t *len, const char *str) { buf[(*len)++] = '\n'; } +#define RAND_NOISE "((random(vec3(floor(gl_FragCoord.xy * noise_scale), float(frame_count))) + 1.0) / 2.0)" + static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_alpha, bool inputs_have_alpha, bool hint_single_element) { if (!only_alpha) { switch (item) { @@ -161,6 +160,8 @@ static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_ return with_alpha ? "texVal1" : "texVal1.rgb"; case SHADER_COMBINED: return with_alpha ? "texel" : "texel.rgb"; + case SHADER_NOISE: + return with_alpha ? "vec4(" RAND_NOISE ", " RAND_NOISE ", " RAND_NOISE ", " RAND_NOISE ")" : "vec3(" RAND_NOISE ", " RAND_NOISE ", " RAND_NOISE ")"; } } else { switch (item) { @@ -186,11 +187,15 @@ static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_ return "texVal1.a"; case SHADER_COMBINED: return "texel.a"; + case SHADER_NOISE: + return RAND_NOISE; } } return ""; } +#undef RAND_NOISE + static void append_formula(char *buf, size_t *len, uint8_t c[2][4], bool do_single, bool do_multiply, bool do_mix, bool with_alpha, bool only_alpha, bool opt_alpha) { if (do_single) { append_str(buf, len, shader_item_to_str(c[only_alpha][3], with_alpha, only_alpha, opt_alpha, false)); @@ -368,15 +373,13 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad append_line(fs_buf, &fs_len, "uniform sampler2D uTex1;"); } - if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(fs_buf, &fs_len, "uniform int frame_count;"); - append_line(fs_buf, &fs_len, "uniform float noise_scale;"); + append_line(fs_buf, &fs_len, "uniform int frame_count;"); + append_line(fs_buf, &fs_len, "uniform float noise_scale;"); - append_line(fs_buf, &fs_len, "float random(in vec3 value) {"); - append_line(fs_buf, &fs_len, " float random = dot(sin(value), vec3(12.9898, 78.233, 37.719));"); - append_line(fs_buf, &fs_len, " return fract(sin(random) * 143758.5453);"); - append_line(fs_buf, &fs_len, "}"); - } + append_line(fs_buf, &fs_len, "float random(in vec3 value) {"); + append_line(fs_buf, &fs_len, " float random = dot(sin(value), vec3(12.9898, 78.233, 37.719));"); + append_line(fs_buf, &fs_len, " return fract(sin(random) * 143758.5453);"); + append_line(fs_buf, &fs_len, "}"); if (current_filter_mode == FILTER_THREE_POINT) { #if __APPLE__ @@ -604,13 +607,8 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad glUniform1i(sampler_location, 1); } - if (cc_features.opt_alpha && cc_features.opt_noise) { - prg->frame_count_location = glGetUniformLocation(shader_program, "frame_count"); - prg->noise_scale_location = glGetUniformLocation(shader_program, "noise_scale"); - prg->used_noise = true; - } else { - prg->used_noise = false; - } + prg->frame_count_location = glGetUniformLocation(shader_program, "frame_count"); + prg->noise_scale_location = glGetUniformLocation(shader_program, "noise_scale"); return prg; } diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 4c193fa4a..c8a866afc 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -413,6 +413,9 @@ static void gfx_generate_cc(struct ColorCombiner *comb, uint64_t cc_id) { val = SHADER_TEXEL1A; used_textures[1] = true; break; + case G_CCMUX_NOISE: + val = SHADER_NOISE; + break; case G_CCMUX_PRIMITIVE: case G_CCMUX_PRIMITIVE_ALPHA: case G_CCMUX_PRIM_LOD_FRAC: From d102506fba492310059313f7c5c63c79ee451ccc Mon Sep 17 00:00:00 2001 From: aMannus Date: Wed, 12 Oct 2022 23:21:04 +0200 Subject: [PATCH 13/14] Catch-all fix for mask select (#1728) --- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index fc5e9dff2..0e5ea0bef 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -381,7 +381,8 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { --INV_CONTENT(ITEM_TRADE_CHILD); } else if ((pauseCtx->stickRelX < -30 || pauseCtx->stickRelX > 30 || pauseCtx->stickRelY < -30 || pauseCtx->stickRelY > 30) || dpad && CHECK_BTN_ANY(input->press.button, BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT)) { - if (INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_LETTER_ZELDA) { + // Change to keaton mask if no mask is in child trade slot. Catches Zelda's letter and bottle duping over this slot. + if (INV_CONTENT(ITEM_TRADE_CHILD) < ITEM_MASK_KEATON || INV_CONTENT(ITEM_TRADE_CHILD) > ITEM_MASK_TRUTH) { INV_CONTENT(ITEM_TRADE_CHILD) = ITEM_MASK_KEATON; } else { INV_CONTENT(ITEM_TRADE_CHILD) ^= ITEM_MASK_KEATON ^ ITEM_MASK_TRUTH; From 6e88a3706ccb23340c95f92417036a4bd5e38d6a Mon Sep 17 00:00:00 2001 From: aMannus Date: Wed, 12 Oct 2022 23:35:40 +0200 Subject: [PATCH 14/14] Fix: "Developer Tools" button sizes (#1757) * Small debug buttons fix * Better fix for buttons --- soh/soh/GameMenuBar.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 208a8e58a..df6af83ad 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -1112,12 +1112,7 @@ namespace GameMenuBar { ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0)); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); - #ifdef __WIIU__ - static ImVec2 buttonSize(200.0f * 2.0f, 0.0f); - #else - static ImVec2 buttonSize(200.0f, 0.0f); - #endif - if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVar_GetS32("gCosmeticsEditorEnabled", 0)).c_str(), buttonSize)) + if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVar_GetS32("gCosmeticsEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVar_GetS32("gCosmeticsEditorEnabled", 0); CVar_SetS32("gCosmeticsEditorEnabled", !currentValue); @@ -1408,12 +1403,7 @@ namespace GameMenuBar { ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0,0)); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); - #ifdef __WIIU__ - static ImVec2 buttonSize(160.0f * 2.0f, 0.0f); - #else - static ImVec2 buttonSize(160.0f, 0.0f); - #endif - if (ImGui::Button(GetWindowButtonText("Stats", CVar_GetS32("gStatsEnabled", 0)).c_str(), buttonSize)) + if (ImGui::Button(GetWindowButtonText("Stats", CVar_GetS32("gStatsEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVar_GetS32("gStatsEnabled", 0); CVar_SetS32("gStatsEnabled", !currentValue); @@ -1422,7 +1412,7 @@ namespace GameMenuBar { } UIWidgets::Tooltip("Shows the stats window, with your FPS and frametimes, and the OS you're playing on"); UIWidgets::Spacer(0); - if (ImGui::Button(GetWindowButtonText("Console", CVar_GetS32("gConsoleEnabled", 0)).c_str(), buttonSize)) + if (ImGui::Button(GetWindowButtonText("Console", CVar_GetS32("gConsoleEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVar_GetS32("gConsoleEnabled", 0); CVar_SetS32("gConsoleEnabled", !currentValue); @@ -1431,7 +1421,7 @@ namespace GameMenuBar { } UIWidgets::Tooltip("Enables the console window, allowing you to input commands, type help for some examples"); UIWidgets::Spacer(0); - if (ImGui::Button(GetWindowButtonText("Save Editor", CVar_GetS32("gSaveEditorEnabled", 0)).c_str(), buttonSize)) + if (ImGui::Button(GetWindowButtonText("Save Editor", CVar_GetS32("gSaveEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVar_GetS32("gSaveEditorEnabled", 0); CVar_SetS32("gSaveEditorEnabled", !currentValue); @@ -1439,7 +1429,7 @@ namespace GameMenuBar { SohImGui::EnableWindow("Save Editor", CVar_GetS32("gSaveEditorEnabled", 0)); } UIWidgets::Spacer(0); - if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVar_GetS32("gCollisionViewerEnabled", 0)).c_str(), buttonSize)) + if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVar_GetS32("gCollisionViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVar_GetS32("gCollisionViewerEnabled", 0); CVar_SetS32("gCollisionViewerEnabled", !currentValue); @@ -1447,7 +1437,7 @@ namespace GameMenuBar { SohImGui::EnableWindow("Collision Viewer", CVar_GetS32("gCollisionViewerEnabled", 0)); } UIWidgets::Spacer(0); - if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVar_GetS32("gActorViewerEnabled", 0)).c_str(), buttonSize)) + if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVar_GetS32("gActorViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVar_GetS32("gActorViewerEnabled", 0); CVar_SetS32("gActorViewerEnabled", !currentValue);