diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2025-01-22 19:30:34 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 01:30:34 +0000 |
| commit | aa2ad2360182f384a6cd09e2961125e9a3fa7a7b (patch) | |
| tree | a8b0e560dede5e4a948de2e5dc5021652d45e596 /soh/src/code | |
| parent | 69e33428082ae084d78fee489462f61a63e14107 (diff) | |
Replace old pause buffer input experience with a more accurate one (#4918)
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/game.c | 2 | ||||
| -rw-r--r-- | soh/src/code/padmgr.c | 7 | ||||
| -rw-r--r-- | soh/src/code/z_kaleido_setup.c | 14 | ||||
| -rw-r--r-- | soh/src/code/z_play.c | 5 |
4 files changed, 3 insertions, 25 deletions
diff --git a/soh/src/code/game.c b/soh/src/code/game.c index a14266719..d7524009b 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -255,6 +255,8 @@ void GameState_Update(GameState* gameState) { GameState_SetFrameBuffer(gfxCtx); + GameInteractor_ExecuteOnGameStateMainStart(); + gameState->main(gameState); func_800C4344(gameState); diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index 8665fb448..a8bf778af 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -286,13 +286,6 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) { Fault_AddHungupAndCrash(__FILE__, __LINE__); } - // When 3 frames are left on easy pause buffer, re-apply the last held inputs to the prev inputs - // to compute the pressed difference. This makes it so previously held inputs are continued as "held", - // but new inputs when unpausing are "pressed" out of the pause menu. - if (CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0) == 3) { - input->prev.button = CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferLastInputs"), 0); - } - buttonDiff = input->prev.button ^ input->cur.button; input->press.button |= (u16)(buttonDiff & input->cur.button); input->rel.button |= (u16)(buttonDiff & input->prev.button); diff --git a/soh/src/code/z_kaleido_setup.c b/soh/src/code/z_kaleido_setup.c index 69ea3030f..45992279d 100644 --- a/soh/src/code/z_kaleido_setup.c +++ b/soh/src/code/z_kaleido_setup.c @@ -18,23 +18,11 @@ void KaleidoSetup_Update(PlayState* play) { play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL && (play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) { - u8 easyPauseBufferEnabled = CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0); - u8 easyPauseBufferTimer = CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0); - - // If start is not seen as pressed on the 2nd to last frame then we should end the easy frame advance flow - if (easyPauseBufferEnabled && easyPauseBufferTimer == 2 && - !CHECK_BTN_ALL(input->press.button, BTN_START)) { - CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0); - } - if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) { if (BREG(0)) { pauseCtx->debugState = 3; } - } else if ((CHECK_BTN_ALL(input->press.button, BTN_START) && (!easyPauseBufferEnabled || !easyPauseBufferTimer)) || - (easyPauseBufferEnabled && easyPauseBufferTimer == 1)) { // Force Kaleido open when easy pause buffer reaches 0 - // Remember last held buttons for pause buffer cheat (minus start so easy frame advance works) - CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferLastInputs"), input->cur.button & ~(BTN_START)); + } else if (CHECK_BTN_ALL(input->press.button, BTN_START)) { gSaveContext.unk_13EE = gSaveContext.unk_13EA; diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index cc7af190d..2b4743417 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1668,11 +1668,6 @@ time_t Play_GetRealTime() { void Play_Main(GameState* thisx) { PlayState* play = (PlayState*)thisx; - // Decrease the easy pause buffer timer every frame - if (CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0) > 0) { - CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0) - 1); - } - if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) { play->envCtx.unk_EE[3] = 64; Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3, 0); |
