diff options
Diffstat (limited to 'engines/kyra/kyra_v1.cpp')
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index bc46d8e1f5..f3014911fc 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -52,8 +52,6 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) _gameSpeed = 60; _tickLength = (uint8)(1000.0 / _gameSpeed); - _quitFlag = false; - _speechFile = ""; _trackMap = 0; _trackMapSize = 0; @@ -202,7 +200,10 @@ KyraEngine_v1::~KyraEngine_v1() { void KyraEngine_v1::quitGame() { debugC(9, kDebugLevelMain, "KyraEngine_v1::quitGame()"); - _quitFlag = true; + Common::Event event; + + event.type = Common::EVENT_QUIT; + _eventMan->pushEvent(event); // Nothing to do here } @@ -240,7 +241,7 @@ int KyraEngine_v1::resetGameFlag(int flag) { } void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) { - while (_system->getMillis() < timestamp && !_quitFlag) { + while (_system->getMillis() < timestamp && !quit()) { if (timestamp - _system->getMillis() >= 10) delay(10, update, isMainLoop); } |