[Scummvm-git-logs] scummvm master -> c364553963b6f364a56bb37be55f14f81574b92f

dreammaster noreply at scummvm.org
Mon Jul 4 03:28:49 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c364553963 CHEWY: Fix alley fight scene


Commit: c364553963b6f364a56bb37be55f14f81574b92f
    https://github.com/scummvm/scummvm/commit/c364553963b6f364a56bb37be55f14f81574b92f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-07-03T20:27:38-07:00

Commit Message:
CHEWY: Fix alley fight scene

The cause of the background not staying black was due to some of the
changes we've done to support both subtitles and speech at the same
time. Rather than trying to further complicate that code, I've added
in a global to disable rendering the screen when the fight cutscene
is active.

Changed paths:
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/rooms/room46.cpp


diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 9a5f8e85ca2..775761dfb85 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -206,6 +206,7 @@ public:
 					0, 0, 0, 0, 0, 0, 0, 0 };
 	CustomInfo _Ci;
 	GotoPkt _gpkt;
+	bool _disableScreen = false;
 
 	int16 _r45_pinfo[R45_MAX_PERSON][4] = {
 	   { 0, 4, 1490, 1500 },
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index b16ef394a17..8a4cdc56df7 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -419,6 +419,11 @@ void setupScreen(SetupScreenMode mode) {
 	int16 i;
 	int16 txt_nr;
 
+	if (_G(disableScreen)) {
+		EVENTS_UPDATE;
+		return;
+	}
+
 	bool isMainLoop = mode == DO_MAIN_LOOP;
 	if (isMainLoop)
 		mode = DO_SETUP;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 9ce420efa14..3eeb95f780a 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -158,19 +158,24 @@ void Room46::kloppe() {
 		
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
+
 		start_aad(244 + i, -1);
 		int16 delay = _G(gameState).DelaySpeed * 50;
 		_G(atds)->print_aad(0, 0);
 
+		_G(disableScreen) = true;
+
 		if (g_engine->_sound->speechEnabled()) {
 			g_engine->_sound->waitForSpeechToFinish();
-			continue;
-		}
-		
-		while (_G(in)->getSwitchCode() == Common::KEYCODE_INVALID && delay) {
-			--delay;
-			SHOULD_QUIT_RETURN;
+		} else {
+			while (_G(in)->getSwitchCode() == Common::KEYCODE_INVALID && delay) {
+				--delay;
+				EVENTS_UPDATE;
+				SHOULD_QUIT_RETURN;
+			}
 		}
+
+		_G(disableScreen) = false;
 	}
 
 	g_engine->_video->playVideo(FCUT_066);




More information about the Scummvm-git-logs mailing list