diff options
Diffstat (limited to 'engines/mortevielle/mortevielle.cpp')
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 88a3ecd9e5..fde3d424c5 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -37,7 +37,8 @@ namespace Mortevielle { MortevielleEngine *g_vm; MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *gameDesc): - Engine(system), _gameDescription(gameDesc), _randomSource("mortevielle") { + Engine(system), _gameDescription(gameDesc), _randomSource("mortevielle"), + _soundManager(_mixer) { g_vm = this; _lastGameFrame = 0; _mouseClick = false; @@ -298,6 +299,22 @@ void MortevielleEngine::setMousePos(const Common::Point &pt) { _mousePos = newPoint; } +/** + * Delay by a given amount + */ +void MortevielleEngine::delay(int amount) { + uint32 endTime = g_system->getMillis() + amount; + + while (g_system->getMillis() < endTime) { + if (g_system->getMillis() > (_lastGameFrame + GAME_FRAME_DELAY)) { + _lastGameFrame = g_system->getMillis(); + g_vm->_screenSurface.updateScreen(); + } + + g_system->delayMillis(10); + } +} + /*-------------------------------------------------------------------------*/ Common::Error MortevielleEngine::run() { |