aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/scene_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/scene_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/scene_lol.cpp')
-rw-r--r--engines/kyra/scene_lol.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 370940c4e4..8cb28840d5 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -604,7 +604,7 @@ void LoLEngine::updateCompass() {
if (_compassStep)
_compassStep -= (((ABS(_compassStep) >> 4) + 2) * dir);
- int16 d = _compassBroken ? ((int8)getRandomNumberSpecial() - _compassDirection) : (_currentDirection << 6) - _compassDirection;
+ int16 d = _compassBroken ? (int8(_rnd.getRandomNumber(255)) - _compassDirection) : (_currentDirection << 6) - _compassDirection;
if (d <= -128)
d += 256;
if (d >= 128)
@@ -1261,8 +1261,8 @@ void LoLEngine::shakeScene(int duration, int width, int height, int restore) {
while (endTime > _system->getMillis()) {
uint32 delayTimer = _system->getMillis() + 2 * _tickLength;
- int s1 = width ? (getRandomNumberSpecial() % (width << 1)) - width : 0;
- int s2 = height ? (getRandomNumberSpecial() % (height << 1)) - height : 0;
+ int s1 = width ? (_rnd.getRandomNumber(255) % (width << 1)) - width : 0;
+ int s2 = height ? (_rnd.getRandomNumber(255) % (height << 1)) - height : 0;
int x1, y1, x2, y2, w, h;
if (s1 >= 0) {