aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/ad
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/ad
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/ad')
-rw-r--r--engines/wintermute/ad/ad_actor.cpp6
-rw-r--r--engines/wintermute/ad/ad_talk_holder.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp
index b4e9d80a02..aa148c9c85 100644
--- a/engines/wintermute/ad/ad_actor.cpp
+++ b/engines/wintermute/ad/ad_actor.cpp
@@ -43,7 +43,7 @@
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
#include "engines/wintermute/base/particles/part_emitter.h"
-#include "engines/wintermute/wintermute.h"
+#include "engines/wintermute/base/base_engine.h"
namespace WinterMute {
@@ -1262,7 +1262,7 @@ BaseSprite *AdActor::getTalkStance(const char *stance) {
}
if (talkAnims.getSize() > 0) {
- int rnd = g_wintermute->randInt(0, talkAnims.getSize() - 1);
+ int rnd = BaseEngine::instance().randInt(0, talkAnims.getSize() - 1);
ret = talkAnims[rnd]->getSprite(_dir);
} else {
if (_standSprite) {
@@ -1307,7 +1307,7 @@ BaseSprite *AdActor::getTalkStanceOld(const char *stance) {
ret = _standSprite->getSprite(_dir);
} else {
// TODO: remember last
- int rnd = g_wintermute->randInt(0, _talkSprites.getSize() - 1);
+ int rnd = BaseEngine::instance().randInt(0, _talkSprites.getSize() - 1);
ret = _talkSprites[rnd]->getSprite(_dir);
}
}
diff --git a/engines/wintermute/ad/ad_talk_holder.cpp b/engines/wintermute/ad/ad_talk_holder.cpp
index 5a2b3df31b..a5ab7f3a6d 100644
--- a/engines/wintermute/ad/ad_talk_holder.cpp
+++ b/engines/wintermute/ad/ad_talk_holder.cpp
@@ -34,7 +34,7 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_sprite.h"
#include "engines/wintermute/platform_osystem.h"
-#include "engines/wintermute/wintermute.h"
+#include "engines/wintermute/base/base_engine.h"
#include "common/str.h"
namespace WinterMute {
@@ -111,7 +111,7 @@ BaseSprite *AdTalkHolder::getTalkStance(const char *stance) {
ret = _sprite;
} else {
// TODO: remember last
- int rnd = g_wintermute->randInt(0, _talkSprites.getSize() - 1);
+ int rnd = BaseEngine::instance().randInt(0, _talkSprites.getSize() - 1);
ret = _talkSprites[rnd];
}
}