diff options
Diffstat (limited to 'engines/wintermute/base/base_engine.cpp')
-rw-r--r-- | engines/wintermute/base/base_engine.cpp | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp index 8146d14beb..d4b17a0a64 100644 --- a/engines/wintermute/base/base_engine.cpp +++ b/engines/wintermute/base/base_engine.cpp @@ -39,10 +39,10 @@ DECLARE_SINGLETON(Wintermute::BaseEngine); namespace Wintermute { BaseEngine::BaseEngine() { - _fileManager = NULL; - _gameRef = NULL; - _classReg = NULL; - _rnd = NULL; + _fileManager = nullptr; + _gameRef = nullptr; + _classReg = nullptr; + _rnd = nullptr; _gameId = ""; } @@ -90,4 +90,36 @@ uint32 BaseEngine::randInt(int from, int to) { return _rnd->getRandomNumberRng(from, to); } +BaseSoundMgr *BaseEngine::getSoundMgr() { + if (instance()._gameRef) { + return _gameRef->_soundMgr; + } else { + return nullptr; + } +} + +BaseRenderer *BaseEngine::getRenderer() { + if (instance()._gameRef) { + return instance()._gameRef->_renderer; + } else { + return nullptr; + } +} + +const Timer *BaseEngine::getTimer() { + if (instance()._gameRef) { + return instance()._gameRef->getTimer(); + } else { + return nullptr; + } +} + +const Timer *BaseEngine::getLiveTimer() { + if (instance()._gameRef) { + return instance()._gameRef->getLiveTimer(); + } else { + return nullptr; + } +} + } // end of namespace Wintermute |