diff options
author | Strangerke | 2014-05-18 12:34:15 +0200 |
---|---|---|
committer | Strangerke | 2014-05-18 12:34:15 +0200 |
commit | e1a06ae543f0926118d2b82aa5344752e11ead1d (patch) | |
tree | 826db24ef5d1e0a28affb6fca7b5dabc52ccb31c | |
parent | e7bef9019a71105a19c9f4eff567b8df47387a8b (diff) | |
download | scummvm-rg350-e1a06ae543f0926118d2b82aa5344752e11ead1d.tar.gz scummvm-rg350-e1a06ae543f0926118d2b82aa5344752e11ead1d.tar.bz2 scummvm-rg350-e1a06ae543f0926118d2b82aa5344752e11ead1d.zip |
MADS: Replace _ongoingGame by the use of quitGame()
-rw-r--r-- | engines/mads/game.cpp | 7 | ||||
-rw-r--r-- | engines/mads/game.h | 1 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.cpp | 2 | ||||
-rw-r--r-- | engines/mads/scene.cpp | 2 |
4 files changed, 4 insertions, 8 deletions
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index 3b00116d25..3c69f452b4 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -77,8 +77,6 @@ Game::Game(MADSEngine *vm): _vm(vm), _surface(nullptr), _objects(vm), _triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _winStatus = 0; _widepipeCtr = 0; - _ongoingGame = true; - // Load the inventory object list _objects.load(); @@ -154,7 +152,7 @@ void Game::run() { } void Game::gameLoop() { - while (!_vm->shouldQuit() && _statusFlag && _ongoingGame) { + while (!_vm->shouldQuit() && _statusFlag) { if (_loadGameSlot != -1) { loadGame(_loadGameSlot); _loadGameSlot = -1; @@ -184,7 +182,7 @@ void Game::gameLoop() { } void Game::sectionLoop() { - while (!_vm->shouldQuit() && _statusFlag && (_sectionNumber == _currentSectionNumber) && _ongoingGame) { + while (!_vm->shouldQuit() && _statusFlag && (_sectionNumber == _currentSectionNumber)) { _kernelMode = KERNEL_ROOM_PRELOAD; _player._spritesChanged = true; _quoteEmergency = false; @@ -461,7 +459,6 @@ void Game::synchronize(Common::Serializer &s, bool phase1) { s.syncAsUint16LE(_triggerMode); synchronizeString(s, _aaName); s.syncAsSint16LE(_lastSave); - s.syncAsByte(_ongoingGame); _scene.synchronize(s); _objects.synchronize(s); diff --git a/engines/mads/game.h b/engines/mads/game.h index 0e9640594c..d171638b66 100644 --- a/engines/mads/game.h +++ b/engines/mads/game.h @@ -149,7 +149,6 @@ public: int _winStatus; int _widepipeCtr; int _loadGameSlot; - bool _ongoingGame; public: virtual ~Game(); diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp index 1c7cd7539c..de89402083 100644 --- a/engines/mads/nebular/nebular_scenes8.cpp +++ b/engines/mads/nebular/nebular_scenes8.cpp @@ -709,7 +709,7 @@ void Scene803::step() { else _game._winStatus = 3; - _game._ongoingGame = false; + _vm->quitGame(); } } diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 3ef88fa630..84e4edc08d 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -334,7 +334,7 @@ bool Scene::getDepthHighBits(const Common::Point &pt) { } void Scene::loop() { - while (!_vm->shouldQuit() && !_reloadSceneFlag && (_nextSceneId == _currentSceneId) && _vm->_game->_ongoingGame) { + while (!_vm->shouldQuit() && !_reloadSceneFlag && (_nextSceneId == _currentSceneId)) { // Handle drawing a game frame doFrame(); |