[Scummvm-git-logs] scummvm master -> 32a17b7db7cfcfa165fd85c6d11bf9fcdd7e762c
AndywinXp
noreply at scummvm.org
Sun Apr 2 20:21:47 UTC 2023
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:
32a17b7db7 SCUMM: Remove very old RNG workaround
Commit: 32a17b7db7cfcfa165fd85c6d11bf9fcdd7e762c
https://github.com/scummvm/scummvm/commit/32a17b7db7cfcfa165fd85c6d11bf9fcdd7e762c
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-04-02T22:21:02+02:00
Commit Message:
SCUMM: Remove very old RNG workaround
A bit of history: this piece of code was apparently put in place in a time
where ScummVM only ran the SCUMM engine, and there was no common
PRNG module (see e48fbc0). This meant that at the time the PRNG was
not seeded as it is today, hence the workaround, which aimed at making
the generated numbers less predictable. This piece of code is not found
in any of the original executables.
Nowadays we put a lot of attention and care into our speedrunner-friendly
features; for example, we have an option which lets the user choose their
own seed for random numbers, so that we can have a degree of replicability
for the various runs. And the piece of code that is being removed in this commit
was reported for causing issues in the runs in which random numbers played
a bigger role.
Changed paths:
engines/scumm/scumm.cpp
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index a0ec149c904..fa64e29a572 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2330,10 +2330,6 @@ Common::Error ScummEngine::go() {
}
while (!shouldQuit()) {
- // Randomize the PRNG by calling it at regular intervals. This ensures
- // that it will be in a different state each time you run the program.
- _rnd.getRandomNumber(2);
-
// Determine how long to wait before the next loop iteration should start
int delta = (VAR_TIMER_NEXT != 0xFF) ? VAR(VAR_TIMER_NEXT) : 4;
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
More information about the Scummvm-git-logs
mailing list