Add disable jabu wobble accessibility option (#6280)
This commit is contained in:
8
soh/soh/Enhancements/DisableJabuWobble.cpp
Normal file
8
soh/soh/Enhancements/DisableJabuWobble.cpp
Normal 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") });
|
||||||
@@ -1251,6 +1251,14 @@ typedef enum {
|
|||||||
// - `*EnItem00`
|
// - `*EnItem00`
|
||||||
VB_ITEM00_DESPAWN,
|
VB_ITEM00_DESPAWN,
|
||||||
|
|
||||||
|
// #### `result`
|
||||||
|
// ```c
|
||||||
|
// true
|
||||||
|
// ```
|
||||||
|
// #### `args`
|
||||||
|
// - None
|
||||||
|
VB_JABU_WOBBLE,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
// ```c
|
// ```c
|
||||||
// true
|
// true
|
||||||
|
|||||||
@@ -236,6 +236,10 @@ void SohMenu::AddMenuSettings() {
|
|||||||
.CVar(CVAR_SETTING("A11yNoScreenFlashForFinishingBlow"))
|
.CVar(CVAR_SETTING("A11yNoScreenFlashForFinishingBlow"))
|
||||||
.RaceDisable(false)
|
.RaceDisable(false)
|
||||||
.Options(CheckboxOptions().Tooltip("Disables the white screen flash on enemy kill."));
|
.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, "EXPERIMENTAL", WIDGET_SEPARATOR_TEXT).Options(TextOptions().Color(Colors::Orange));
|
||||||
AddWidget(path, "ImGui Menu Scaling", WIDGET_CVAR_COMBOBOX)
|
AddWidget(path, "ImGui Menu Scaling", WIDGET_CVAR_COMBOBOX)
|
||||||
.CVar(CVAR_SETTING("ImGuiScale"))
|
.CVar(CVAR_SETTING("ImGuiScale"))
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include "soh/mq_asset_hacks.h"
|
#include "soh/mq_asset_hacks.h"
|
||||||
#include "soh/OTRGlobals.h"
|
#include "soh/OTRGlobals.h"
|
||||||
#include "soh/ResourceManagerHelpers.h"
|
#include "soh/ResourceManagerHelpers.h"
|
||||||
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||||
|
|
||||||
// Entrance Table definition
|
// Entrance Table definition
|
||||||
#define DEFINE_ENTRANCE(_0, sceneId, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \
|
#define DEFINE_ENTRANCE(_0, sceneId, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \
|
||||||
@@ -1572,8 +1573,10 @@ void func_8009FE58(PlayState* play) {
|
|||||||
|
|
||||||
if (FrameAdvance_IsEnabled(play) != true) {
|
if (FrameAdvance_IsEnabled(play) != true) {
|
||||||
|
|
||||||
|
if (GameInteractor_Should(VB_JABU_WOBBLE, true)) {
|
||||||
D_8012A39C += 1820;
|
D_8012A39C += 1820;
|
||||||
D_8012A3A0 += 1820;
|
D_8012A3A0 += 1820;
|
||||||
|
}
|
||||||
|
|
||||||
temp = 0.020000001f;
|
temp = 0.020000001f;
|
||||||
|
|
||||||
@@ -1608,7 +1611,7 @@ void func_8009FE58(PlayState* play) {
|
|||||||
break;
|
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);
|
D_8012A398 += 0.15f + (play->roomCtx.unk_74[1] * 0.001f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user