From 9f67216b11c8c744430d106f36a77068ed8e55d6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 16 Apr 2014 08:44:12 -0400 Subject: MADS: Fix to stop game ending when loading a cutscene scene --- engines/mads/game.cpp | 4 +--- engines/mads/player.cpp | 2 +- engines/mads/scene.cpp | 2 +- engines/mads/scene.h | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index 82a7b66c92..d3e3987d4e 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -288,11 +288,9 @@ void Game::sectionLoop() { } // Clear the scene - _scene.free(); + _scene.freeCurrentScene(); _sectionNumber = _scene._nextSceneId / 100; - // TODO: sub_1DD46(3) - // Check whether to show a dialog checkShowDialog(); } diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index 9301fdc50a..cc482c0608 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -135,7 +135,7 @@ bool Player::loadSprites(const Common::String &prefix) { } else { Common::fill(&_spriteSetsPresent[0], &_spriteSetsPresent[PLAYER_SPRITES_FILE_COUNT], false); _highSprites = false; - return true; + return false; } } diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 948688e7a2..e2892fbbd1 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -563,7 +563,7 @@ void Scene::updateCursor() { } } -void Scene::free() { +void Scene::freeCurrentScene() { if (_animationData) { delete _animationData; _animationData = nullptr; diff --git a/engines/mads/scene.h b/engines/mads/scene.h index e00924a543..f18d6ad4cd 100644 --- a/engines/mads/scene.h +++ b/engines/mads/scene.h @@ -207,9 +207,9 @@ public: Common::String getVocab(int vocabId) { return _vocabStrings[vocabId - 1]; } /** - * Clear the data for the scene + * Clear the data for the currently loaded scene */ - void free(); + void freeCurrentScene(); /** * Set the walk surface for a scene to a different variant -- cgit v1.2.3