mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Add cheat for easy pause buffering (#1439)
* Add cheat for easy pause buffering * Add pause input buffering * Fix pause input buffering * Changes from feedback * Convert frame to bool * Handle when pad is nullptr * Add newline * Split input buffering into it's own CVAR * Split SetShouldBlockGameInput up into to methods
This commit is contained in:
parent
d628bafe29
commit
936c493b9e
10 changed files with 60 additions and 11 deletions
|
@ -288,6 +288,11 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
|
|||
}
|
||||
|
||||
OTRControllerCallback(&controllerCallback);
|
||||
if (CVar_GetS32("gPauseBufferBlockInputFrame", 0)) {
|
||||
Controller_BlockGameInput();
|
||||
} else {
|
||||
Controller_UnblockGameInput();
|
||||
}
|
||||
|
||||
PadMgr_UnlockPadData(padMgr);
|
||||
}
|
||||
|
|
|
@ -18,11 +18,15 @@ void KaleidoSetup_Update(GlobalContext* globalCtx) {
|
|||
globalCtx->shootingGalleryStatus <= 1 && gSaveContext.unk_13F0 != 8 && gSaveContext.unk_13F0 != 9 &&
|
||||
(globalCtx->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
|
||||
if (CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) == 2 && !CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
CVar_SetS32("gCheatEasyPauseBufferFrameAdvance", 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)) {
|
||||
} else if ((CHECK_BTN_ALL(input->press.button, BTN_START) && !CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0)) || CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) == 1) {
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
|
||||
|
|
|
@ -1481,6 +1481,13 @@ time_t Gameplay_GetRealTime() {
|
|||
void Gameplay_Main(GameState* thisx) {
|
||||
GlobalContext* globalCtx = (GlobalContext*)thisx;
|
||||
|
||||
if (CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0)) {
|
||||
CVar_SetS32("gCheatEasyPauseBufferFrameAdvance", CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) - 1);
|
||||
}
|
||||
if (CVar_GetS32("gPauseBufferBlockInputFrame", 0)) {
|
||||
CVar_SetS32("gPauseBufferBlockInputFrame", CVar_GetS32("gPauseBufferBlockInputFrame", 0) - 1);
|
||||
}
|
||||
|
||||
D_8012D1F8 = &globalCtx->state.input[0];
|
||||
|
||||
DebugDisplay_Init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue