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

AndywinXp noreply at scummvm.org
Sun Aug 11 17:11:08 UTC 2024


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:
ec0944b04c SCUMM: FT (Demo): Use v6 main loop structure


Commit: ec0944b04cf08331c37f233300180ef038a11f96
    https://github.com/scummvm/scummvm/commit/ec0944b04cf08331c37f233300180ef038a11f96
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-08-11T19:11:04+02:00

Commit Message:
SCUMM: FT (Demo): Use v6 main loop structure

This fixes minor glitches in the verb interface. After all, this
demo is meant to use some hybrid between v6 and v7...

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index cbb3a8a2d22..87654b6e38d 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2670,10 +2670,12 @@ void ScummEngine::scummLoop(int delta) {
 	if (_game.version <= 3)
 		displayDialog();
 
+	bool isFTDOSDemo = (_game.id == GID_FT) && (_game.features & GF_DEMO) && (_game.platform == Common::kPlatformDOS);
+
 	// In v7 we have to run processInput() at the end of the loop,
 	// to allow one frame time to pass between checkExecVerbs() and runAllScripts().
 	// Several time-based effects (e.g. shaking) depend on this...
-	if (_game.version != 7) {
+	if (_game.version != 7 || isFTDOSDemo) {
 		processInput();
 
 		// Additionally, v8 runs checkExecVerbs() at the end of processInput()...
@@ -2741,7 +2743,7 @@ load_game:
 		((SoundHE *)_sound)->handleSoundFrame();
 	}
 
-	if (_game.version < 7) {
+	if (_game.version < 7 || isFTDOSDemo) {
 		runAllScripts();
 		checkExecVerbs();
 	}
@@ -2758,7 +2760,7 @@ load_game:
 	// 
 	// Again, from the disasms, we call runAllScripts() on a loop,
 	// while the _saveLoadFlag is active.
-	if (_game.version == 7) {
+	if (_game.version == 7 && !isFTDOSDemo) {
 		do {
 			runAllScripts();
 			scummLoop_handleSaveLoad();
@@ -2829,7 +2831,7 @@ load_game:
 	// these two functions should be called; this will delay the
 	// scripts executions between checkExecVerbs() and runAllScripts()
 	// by exactly one frame.
-	if (_game.version == 7) {
+	if (_game.version == 7 && !isFTDOSDemo) {
 		processInput();
 		checkExecVerbs();
 	}




More information about the Scummvm-git-logs mailing list