From d3de296221329daf47d8f9c0de6b96b944707f9e Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Sat, 22 May 2021 22:26:19 +0600 Subject: [PATCH] - fix cutscene skipping (hopefully) --- src_rebuild/Game/C/cutscene.c | 9 +-------- src_rebuild/Game/C/main.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src_rebuild/Game/C/cutscene.c b/src_rebuild/Game/C/cutscene.c index f6b63d28..668d7071 100644 --- a/src_rebuild/Game/C/cutscene.c +++ b/src_rebuild/Game/C/cutscene.c @@ -183,12 +183,7 @@ void HandleInGameCutscene(void) if (CutsceneLength-28 < CutsceneFrameCnt) { - // disable cutscene skip when it's about to end - if (gSkipInGameCutscene) - { - FastForward = 0; - gSkipInGameCutscene = 0; - } + gSkipInGameCutscene = 0; if (BlackBorderHeight > 0) BlackBorderHeight--; @@ -203,8 +198,6 @@ void HandleInGameCutscene(void) if (gSkipInGameCutscene) { - // fast forward and stop XA - FastForward = 1; StopXA(); UnprepareXA(); } diff --git a/src_rebuild/Game/C/main.c b/src_rebuild/Game/C/main.c index 7b94ca08..85d6a51d 100644 --- a/src_rebuild/Game/C/main.c +++ b/src_rebuild/Game/C/main.c @@ -1289,7 +1289,7 @@ int FilterFrameTime() static int frame = 0; // always stay 30 FPS (2 vblanks) - if (!gSkipInGameCutscene && VSync(-1) - frame < 2) + if (VSync(-1) - frame < 2) return 0; frame = VSync(-1); @@ -1394,7 +1394,7 @@ void StepGame(void) HandleExplosion(); - if (FastForward == 0) + if (FastForward == 0 && gSkipInGameCutscene == 0) ColourCycle(); combointensity = NightAmbient | NightAmbient << 8 | NightAmbient << 0x10; @@ -1621,6 +1621,13 @@ void State_GameLoop(void* param) DrawGame(); #else + if (gSkipInGameCutscene) + { + StepGame(); + ClearCurrentDrawBuffers(); + return; + } + if (!FilterFrameTime()) return; @@ -1658,12 +1665,6 @@ int ObjectDrawnCounter = 0; // [D] [T] void DrawGame(void) { - if (gSkipInGameCutscene) - { - ClearCurrentDrawBuffers(); - return; - } - if (NumPlayers == 1 || NoPlayerControl) { ObjectDrawnValue = FrameCnt;