GLK: ALAN3: Re-enable ifdefed TODO block

This commit is contained in:
Paul Gilbert 2019-07-06 21:05:22 -07:00
parent 2a0f8af958
commit 76d4816853
2 changed files with 9 additions and 6 deletions

View File

@ -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);
}

View File

@ -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;