diff options
Diffstat (limited to 'engines/macventure/macventure.cpp')
-rw-r--r-- | engines/macventure/macventure.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp index 0e3e5a5e5b..383832b80e 100644 --- a/engines/macventure/macventure.cpp +++ b/engines/macventure/macventure.cpp @@ -88,9 +88,9 @@ Common::Error MacVentureEngine::run() { _world = new World(this, _resourceManager); _shouldQuit = false; - while (!_shouldQuit) { + while (!(_gameState == kGameStateQuitting)) { processEvents(); - + _gui->draw(); g_system->updateScreen(); @@ -102,10 +102,12 @@ Common::Error MacVentureEngine::run() { void MacVentureEngine::requestQuit() { _shouldQuit = true; + _gameState = kGameStateQuitting; } void MacVentureEngine::requestUnpause() { _paused = false; + _gameState = kGameStatePlaying; } const GlobalSettings& MacVentureEngine::getGlobalSettings() const { @@ -130,8 +132,8 @@ void MacVentureEngine::processEvents() { continue; switch (event.type) { - case Common::EVENT_QUIT: - _shouldQuit = true; + case Common::EVENT_QUIT: + _gameState = kGameStateQuitting; break; default: break; @@ -222,10 +224,12 @@ bool MacVentureEngine::loadTextHuffman() { values[i] = res->readByte(); _textHuffman = new Common::Huffman(0, numEntries, masks, lengths, values); - + debug(5, "Text is huffman-encoded"); return true; } return false; } + + } // End of namespace MacVenture |