Cheat: Disable Sandstorm (#5800)

* Cheat: Disable Sandstorm

Can also be considered an A11y feature,
tho it'll always be hard with the muted colors,
even if we added option to reduce fog

* extern C?
This commit is contained in:
Philip Dubé
2025-10-10 17:25:41 +00:00
committed by GitHub
parent 52a8f6c281
commit f253d24cdc
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
extern "C" PlayState* gPlayState;
void DisableSandstormAfterTransition(int16_t sceneNum) {
if (sceneNum == SCENE_HAUNTED_WASTELAND) {
gPlayState->envCtx.sandstormState = SANDSTORM_OFF;
}
}
void RegisterDisableSandstorm() {
COND_HOOK(OnTransitionEnd, CVarGetInteger(CVAR_CHEAT("DisableSandstorm"), 0), DisableSandstormAfterTransition);
}
static RegisterShipInitFunc initFunc(RegisterDisableSandstorm, { CVAR_CHEAT("DisableSandstorm") });

View File

@@ -1746,6 +1746,9 @@ void SohMenu::AddMenuEnhancements() {
.Options(CheckboxOptions().Tooltip(
"Keese and Guay no longer target you and simply ignore you as if you were wearing the "
"Skull Mask."));
AddWidget(path, "Disable Haunted Wasteland Sandstorm", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_CHEAT("DisableSandstorm"))
.Options(CheckboxOptions().Tooltip("Disables sandstorm effect in Haunted Wasteland."));
AddWidget(path, "Glitch Aids", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Easy Frame Advancing with Pause", WIDGET_CVAR_CHECKBOX)