Enhancement to disable heat haze (#6663)

This commit is contained in:
Shishu the Dragon
2026-06-07 07:56:31 +12:00
committed by GitHub
parent 2d962bbb8c
commit ef014a35e6
4 changed files with 23 additions and 1 deletions
+8
View File
@@ -0,0 +1,8 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
void RegisterDisableHeatHaze() {
COND_VB_SHOULD(VB_HOT_ROOM_DISTORTION, CVarGetInteger(CVAR_SETTING("A11yNoHeatHaze"), 0), { *should = false; });
}
static RegisterShipInitFunc initFunc(RegisterDisableHeatHaze, { CVAR_SETTING("A11yNoHeatHaze") });
@@ -1365,6 +1365,14 @@ typedef enum {
// - None
VB_JABU_WOBBLE,
// #### `result`
// ```c
// true
// ```
// #### `args`
// - None
VB_HOT_ROOM_DISTORTION,
// #### `result`
// ```c
// true
+4
View File
@@ -251,6 +251,10 @@ void SohMenu::AddMenuSettings() {
.CVar(CVAR_SETTING("A11yNoJabuWobble"))
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Disable the geometry wobble and camera distortion inside Jabu."));
AddWidget(path, "Disable Heat Haze", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_SETTING("A11yNoHeatHaze"))
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Disable the heat haze distortion effect in Death Mountain / Fire Temple."));
AddWidget(path, "EXPERIMENTAL", WIDGET_SEPARATOR_TEXT).Options(TextOptions().Color(Colors::Orange));
AddWidget(path, "ImGui Menu Scaling", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_SETTING("ImGuiScale"))
+3 -1
View File
@@ -8,6 +8,7 @@
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/controls/Mouse.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags);
s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags);
@@ -7363,7 +7364,8 @@ s32 Camera_UpdateWater(Camera* camera) {
s32 Camera_UpdateHotRoom(Camera* camera) {
camera->distortionFlags &= ~DISTORTION_HOT_ROOM;
if (camera->play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) {
if (GameInteractor_Should(VB_HOT_ROOM_DISTORTION,
camera->play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3)) {
camera->distortionFlags |= DISTORTION_HOT_ROOM;
}