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

Die4Ever noreply at scummvm.org
Sun Jan 23 06:04:14 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:
dcda662540 GROOVIE: debug logging for logic puzzles


Commit: dcda66254086d303eb6f5b8d6bf9b95901b1d603
    https://github.com/scummvm/scummvm/commit/dcda66254086d303eb6f5b8d6bf9b95901b1d603
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-01-23T00:03:42-06:00

Commit Message:
GROOVIE: debug logging for logic puzzles

Changed paths:
    engines/groovie/groovie.cpp
    engines/groovie/script.cpp


diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 5c4e4aa9776..da467ddd61f 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -91,6 +91,7 @@ Common::Error GroovieEngine::run() {
 	// TODO: remove this when we figure out the potential intermittent save game bug
 	DebugMan.enableDebugChannel(kDebugScript);
 	DebugMan.enableDebugChannel(kDebugScriptvars);
+	DebugMan.enableDebugChannel(kDebugLogic);
 	if (gDebugLevel < 0)
 		gDebugLevel = 0;
 
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 3bc54de446d..4ed8bff5a68 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -1148,6 +1148,7 @@ void Script::o_random() {
 	uint8 maxnum = readScript8bits();
 
 	byte oldVal = _variables[varnum];
+	uint32 seed = _random.getSeed();
 
 	// TODO: Check if this is really different between the Engines
 	if (_version == kGroovieT7G) {
@@ -1156,7 +1157,7 @@ void Script::o_random() {
 		setVariable(varnum, _random.getRandomNumber(maxnum - 1));
 	}
 
-	debugC(0, kDebugScript, "Groovie::Script: RANDOM: var[0x%04X] = rand(%d), changed from %d to %d", varnum, maxnum, oldVal, _variables[varnum]);
+	debugC(0, kDebugScript, "Groovie::Script: RANDOM: var[0x%04X] = rand(%d), changed from %d to %d, seed was %u", varnum, maxnum, oldVal, _variables[varnum], seed);
 }
 
 void Script::o_jmp() {




More information about the Scummvm-git-logs mailing list