[Scummvm-git-logs] scummvm master -> 76d48168537644e6f8e3900e292f04c7880c53c1

dreammaster paulfgilbert at gmail.com
Sun Jul 7 06:06:02 CEST 2019


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:
76d4816853 GLK: ALAN3: Re-enable ifdefed TODO block


Commit: 76d48168537644e6f8e3900e292f04c7880c53c1
    https://github.com/scummvm/scummvm/commit/76d48168537644e6f8e3900e292f04c7880c53c1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-07-06T21:05:22-07:00

Commit Message:
GLK: ALAN3: Re-enable ifdefed TODO block

Changed paths:
    engines/glk/alan3/main.cpp
    engines/glk/glk.h


diff --git a/engines/glk/alan3/main.cpp b/engines/glk/alan3/main.cpp
index 9d7b4d7..7b09840 100644
--- a/engines/glk/alan3/main.cpp
+++ b/engines/glk/alan3/main.cpp
@@ -385,12 +385,10 @@ static void checkDebug(CONTEXT) {
 		traceInstructionOption = FALSE;
 		tracePushOption = FALSE;
 	}
-#ifdef TODO
-	if (debugOption || regressionTestOption) /* If debugging... */
-		srand(1);           /* ... use no randomization */
-	else
-		srand(time(0));     /* Else seed random generator */
-#endif
+
+	// If debugging, use no randomization
+	if (debugOption || regressionTestOption)
+		g_vm->setRandomNumberSeed(1);
 }
 
 
diff --git a/engines/glk/glk.h b/engines/glk/glk.h
index cc3fc10..bd3594a 100644
--- a/engines/glk/glk.h
+++ b/engines/glk/glk.h
@@ -222,6 +222,11 @@ public:
 	 * Get a random number
 	 */
 	uint getRandomNumber(uint max) { return _random.getRandomNumber(max); }
+
+	/**
+	 * Set a random number seed
+	 */
+	void setRandomNumberSeed(uint seed) { _random.setSeed(seed); }
 };
 
 extern GlkEngine *g_vm;





More information about the Scummvm-git-logs mailing list