aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-06 21:05:22 -0700
committerPaul Gilbert2019-07-06 21:05:22 -0700
commit76d48168537644e6f8e3900e292f04c7880c53c1 (patch)
tree6fee179973382f7bf3328da3425adb639234b9ac
parent2a0f8af958ede6df943276ff971bb4b5ff2745c0 (diff)
downloadscummvm-rg350-76d48168537644e6f8e3900e292f04c7880c53c1.tar.gz
scummvm-rg350-76d48168537644e6f8e3900e292f04c7880c53c1.tar.bz2
scummvm-rg350-76d48168537644e6f8e3900e292f04c7880c53c1.zip
GLK: ALAN3: Re-enable ifdefed TODO block
-rw-r--r--engines/glk/alan3/main.cpp10
-rw-r--r--engines/glk/glk.h5
2 files changed, 9 insertions, 6 deletions
diff --git a/engines/glk/alan3/main.cpp b/engines/glk/alan3/main.cpp
index 9d7b4d71f6..7b09840ce1 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 cc3fc10c85..bd3594ae39 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;