Add disable jabu wobble accessibility option (#6280)

This commit is contained in:
red
2026-03-01 18:45:17 -06:00
committed by GitHub
parent 0a946e5b9d
commit 2c07edc4eb
4 changed files with 26 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
void RegisterDisableJabuWobble() {
COND_VB_SHOULD(VB_JABU_WOBBLE, CVarGetInteger(CVAR_SETTING("A11yNoJabuWobble"), 0), { *should = false; });
}
static RegisterShipInitFunc initFunc(RegisterDisableJabuWobble, { CVAR_SETTING("A11yNoJabuWobble") });

View File

@@ -1251,6 +1251,14 @@ typedef enum {
// - `*EnItem00`
VB_ITEM00_DESPAWN,
// #### `result`
// ```c
// true
// ```
// #### `args`
// - None
VB_JABU_WOBBLE,
// #### `result`
// ```c
// true

View File

@@ -236,6 +236,10 @@ void SohMenu::AddMenuSettings() {
.CVar(CVAR_SETTING("A11yNoScreenFlashForFinishingBlow"))
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Disables the white screen flash on enemy kill."));
AddWidget(path, "Disable Jabu Wobble", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_SETTING("A11yNoJabuWobble"))
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Disable the geometry wobble and camera distortion inside Jabu."));
AddWidget(path, "EXPERIMENTAL", WIDGET_SEPARATOR_TEXT).Options(TextOptions().Color(Colors::Orange));
AddWidget(path, "ImGui Menu Scaling", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_SETTING("ImGuiScale"))

View File

@@ -26,6 +26,7 @@
#include "soh/mq_asset_hacks.h"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
// Entrance Table definition
#define DEFINE_ENTRANCE(_0, sceneId, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \
@@ -1572,8 +1573,10 @@ void func_8009FE58(PlayState* play) {
if (FrameAdvance_IsEnabled(play) != true) {
D_8012A39C += 1820;
D_8012A3A0 += 1820;
if (GameInteractor_Should(VB_JABU_WOBBLE, true)) {
D_8012A39C += 1820;
D_8012A3A0 += 1820;
}
temp = 0.020000001f;
@@ -1608,7 +1611,7 @@ void func_8009FE58(PlayState* play) {
break;
}
if (play->pauseCtx.state == 0) {
if (GameInteractor_Should(VB_JABU_WOBBLE, play->pauseCtx.state == 0)) {
D_8012A398 += 0.15f + (play->roomCtx.unk_74[1] * 0.001f);
}
}