Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mm/2s2h/BenGui/BenMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,9 @@ void BenMenu::AddEnhancements() {
AddWidget(path, "Disable Screen Flash for Enemy Kills", WIDGET_CVAR_CHECKBOX)
.CVar("gEnhancements.A11y.NoScreenFlashForEnemyKill")
.Options(CheckboxOptions().Tooltip("Disables the white screen flash on enemy kill."));
AddWidget(path, "Disable Final Day Quakes", WIDGET_CVAR_CHECKBOX)
.CVar("gEnhancements.A11y.NoFinalDayQuakes")
.Options(CheckboxOptions().Tooltip("Earthquakes will not occur on the final day."));
AddWidget(path, "Bow Reticle", WIDGET_CVAR_CHECKBOX)
.CVar("gEnhancements.Graphics.BowReticle")
.Options(CheckboxOptions().Tooltip("Gives the bow a reticle when you draw an arrow."));
Expand Down
12 changes: 12 additions & 0 deletions mm/2s2h/Enhancements/Accessibility/NoFinalDayQuakes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <libultraship/bridge/consolevariablebridge.h>
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/ShipInit.hpp"

#define CVAR_NAME "gEnhancements.A11y.NoFinalDayQuakes"
#define CVAR CVarGetInteger(CVAR_NAME, 0)

static void RegisterDisableFinalDayQuakes() {
COND_VB_SHOULD(VB_EARTHQUAKE_ON_DAY_3, CVAR, { *should = false; });
}

static RegisterShipInitFunc initFunc(RegisterDisableFinalDayQuakes, { CVAR_NAME });
8 changes: 8 additions & 0 deletions mm/2s2h/GameInteractor/GameInteractor_VanillaBehavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,14 @@ typedef enum {
// - `u16` params
VB_DROP_COLLECTIBLE,

// #### `result`
// ```c
// (CURRENT_DAY == 3) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE)
// ```
// #### `args`
// - None
VB_EARTHQUAKE_ON_DAY_3,

// #### `result`
// ```c
// (play->sceneId == SCENE_F40) || (play->sceneId == SCENE_F41) ||
Expand Down
3 changes: 2 additions & 1 deletion mm/src/code/z_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -7213,7 +7213,8 @@ void Camera_EarthquakeDay3(Camera* camera) {
0x1FC, // 8 Large Earthquakes between CLOCK_TIME(4, 30) to CLOCK_TIME(6, 00)
};

if ((CURRENT_DAY == 3) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE)) {
if (GameInteractor_Should(VB_EARTHQUAKE_ON_DAY_3,
(CURRENT_DAY == 3) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE))) {
time = CURRENT_TIME;
timeSpeedOffset = gSaveContext.save.timeSpeedOffset;

Expand Down
Loading