diff options
author | Einar Johan Trøan Sømåen | 2012-08-07 13:32:26 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-08-07 13:32:26 +0200 |
commit | e32b79bff1260f8d2853404f750acc22209a323b (patch) | |
tree | b1d3191d6c3e91137af713511102792af99c893a /engines/wintermute/base/base_engine.h | |
parent | 9bda50ef48e47160c2788399bf7a4d4b04848aca (diff) | |
download | scummvm-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/base/base_engine.h')
-rw-r--r-- | engines/wintermute/base/base_engine.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h index b9dcfcb845..253ef048ab 100644 --- a/engines/wintermute/base/base_engine.h +++ b/engines/wintermute/base/base_engine.h @@ -29,8 +29,9 @@ #ifndef WINTERMUTE_BASE_ENGINE_H #define WINTERMUTE_BASE_ENGINE_H - #include "common/str.h" - #include "common/singleton.h" +#include "common/str.h" +#include "common/singleton.h" +#include "common/random.h" namespace WinterMute { @@ -42,12 +43,16 @@ class BaseEngine : public Common::Singleton<WinterMute::BaseEngine> { BaseFileManager *_fileManager; Common::String _gameId; BaseGame *_gameRef; + // We need random numbers + Common::RandomSource *_rnd; public: BaseEngine(); ~BaseEngine(); static void createInstance(const Common::String &gameid); void setGameRef(BaseGame *gameRef) { _gameRef = gameRef; } + Common::RandomSource *getRandomSource() { return _rnd; } + uint32 randInt(int from, int to); BaseGame *getGameRef() { return _gameRef; } BaseFileManager *getFileManager() { return _fileManager; } static void LOG(bool res, const char *fmt, ...); |