aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/lol.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-18 21:47:10 +0000
committerJohannes Schickel2009-06-18 21:47:10 +0000
commit2e27c7b49246c1e0dc1d2d2fe8f767dcad15f2cb (patch)
treed4a0096ce65fa1a2870f21d9a1d8ee41495ea162 /engines/kyra/lol.cpp
parent4562fe248a1ded2d64e43800ec4e8fcb43e95d3a (diff)
downloadscummvm-rg350-2e27c7b49246c1e0dc1d2d2fe8f767dcad15f2cb.tar.gz
scummvm-rg350-2e27c7b49246c1e0dc1d2d2fe8f767dcad15f2cb.tar.bz2
scummvm-rg350-2e27c7b49246c1e0dc1d2d2fe8f767dcad15f2cb.zip
Replaced "getRandomNumberSpecial" be RandomSource usage. (This is needed for proper event recording, also the probability for generated numbers is actually nearly the same)
svn-id: r41646
Diffstat (limited to 'engines/kyra/lol.cpp')
-rw-r--r--engines/kyra/lol.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 107091a479..20ca169cb5 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1797,32 +1797,6 @@ void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
}
}
-uint8 LoLEngine::getRandomNumberSpecial() {
- uint8 a = _rndSpecial & 0xff;
- uint8 b = (_rndSpecial >> 8) & 0xff;
- uint8 c = (_rndSpecial >> 16) & 0xff;
-
- a >>= 1;
-
- uint as = a & 1;
- uint bs = (b >> 7) ? 0 : 1;
- uint cs = c >> 7;
-
- a >>= 1;
- c = (c << 1) | as;
- b = (b << 1) | cs;
-
- a -= ((_rndSpecial & 0xff) - bs);
- as = a & 1;
- a >>= 1;
-
- a = ((_rndSpecial & 0xff) >> 1) | (as << 7);
-
- _rndSpecial = (_rndSpecial & 0xff000000) | (c << 16) | (b << 8) | a;
-
- return a ^ b;
-}
-
void LoLEngine::updateEnvironmentalSfx(int soundId) {
snd_processEnvironmentalSoundEffect(soundId, _currentBlock);
}