aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/utils
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-08-07 13:32:26 +0200
committerEinar Johan Trøan Sømåen2012-08-07 13:32:26 +0200
commite32b79bff1260f8d2853404f750acc22209a323b (patch)
treeb1d3191d6c3e91137af713511102792af99c893a /engines/wintermute/utils
parent9bda50ef48e47160c2788399bf7a4d4b04848aca (diff)
downloadscummvm-rg350-e32b79bff1260f8d2853404f750acc22209a323b.tar.gz
scummvm-rg350-e32b79bff1260f8d2853404f750acc22209a323b.tar.bz2
scummvm-rg350-e32b79bff1260f8d2853404f750acc22209a323b.zip
WINTERMUTE: Save the random-seed as well.
Diffstat (limited to 'engines/wintermute/utils')
-rw-r--r--engines/wintermute/utils/utils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index 6571147a80..f8a7b0e547 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -28,6 +28,7 @@
#include "engines/wintermute/utils/utils.h"
#include "engines/wintermute/wintermute.h"
+#include "engines/wintermute/base/base_engine.h"
namespace WinterMute {
@@ -126,14 +127,14 @@ int BaseUtils::randomInt(int from, int to) {
to = from;
from = i;
}
- return g_wintermute->randInt(from, to);
+ return BaseEngine::instance().randInt(from, to);
// return (rand() % (to - from + 1)) + from;
}
//////////////////////////////////////////////////////////////////////////
float BaseUtils::randomFloat(float from, float to) {
const uint32 randMax = RAND_MAX;
- float randNum = (float)g_wintermute->randInt(0, randMax) / (float)randMax;
+ float randNum = (float)BaseEngine::instance().randInt(0, randMax) / (float)randMax;
return from + (to - from) * randNum;
}