aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/base/base_engine.cpp2
-rw-r--r--engines/wintermute/base/base_engine.h2
-rw-r--r--engines/wintermute/base/base_fader.cpp11
3 files changed, 8 insertions, 7 deletions
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp
index 2dcf2d6cdc..d4b17a0a64 100644
--- a/engines/wintermute/base/base_engine.cpp
+++ b/engines/wintermute/base/base_engine.cpp
@@ -100,7 +100,7 @@ BaseSoundMgr *BaseEngine::getSoundMgr() {
BaseRenderer *BaseEngine::getRenderer() {
if (instance()._gameRef) {
- return _gameRef->_renderer;
+ return instance()._gameRef->_renderer;
} else {
return nullptr;
}
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index e460711d22..d972e6ebbc 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -64,7 +64,7 @@ public:
BaseGame *getGameRef() { return _gameRef; }
BaseFileManager *getFileManager() { return _fileManager; }
BaseSoundMgr *getSoundMgr();
- BaseRenderer *getRenderer();
+ static BaseRenderer *getRenderer();
static const Timer *getTimer();
static const Timer *getLiveTimer();
static void LOG(bool res, const char *fmt, ...);
diff --git a/engines/wintermute/base/base_fader.cpp b/engines/wintermute/base/base_fader.cpp
index 079304520b..0d17b07a9d 100644
--- a/engines/wintermute/base/base_fader.cpp
+++ b/engines/wintermute/base/base_fader.cpp
@@ -27,7 +27,8 @@
*/
#include "engines/wintermute/base/base_fader.h"
-#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/timer.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "common/util.h"
@@ -71,7 +72,7 @@ bool BaseFader::update() {
if (_system) {
time = g_system->getMillis() - _startTime;
} else {
- time = _gameRef->getTimer()->getTime() - _startTime;
+ time = BaseEngine::getTimer()->getTime() - _startTime;
}
if (time >= _duration) {
@@ -97,7 +98,7 @@ bool BaseFader::display() {
}
if (_currentAlpha > 0x00) {
- _gameRef->_renderer->fadeToColor(_red, _green, _blue, _currentAlpha);
+ BaseEngine::getRenderer()->fadeToColor(_red, _green, _blue, _currentAlpha);
}
return STATUS_OK;
}
@@ -129,7 +130,7 @@ bool BaseFader::fadeIn(uint32 sourceColor, uint32 duration, bool system) {
if (_system) {
_startTime = g_system->getMillis();
} else {
- _startTime = _gameRef->getTimer()->getTime();
+ _startTime = BaseEngine::getTimer()->getTime();
}
return STATUS_OK;
@@ -155,7 +156,7 @@ bool BaseFader::fadeOut(uint32 targetColor, uint32 duration, bool system) {
if (_system) {
_startTime = g_system->getMillis();
} else {
- _startTime = _gameRef->getTimer()->getTime();
+ _startTime = BaseEngine::getTimer()->getTime();
}