From 1c5bb23f02264d91130e6dbc894a03658effdf05 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 13 Jun 2015 11:47:17 -0400 Subject: SHERLOCK: RT: Reset _runningProlog when loading a savegame --- engines/sherlock/scene.h | 2 +- engines/sherlock/tattoo/tattoo_scene.cpp | 18 +++++++++++++++++- engines/sherlock/tattoo/tattoo_scene.h | 5 +++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h index 0fd3483756..2cf8b803b4 100644 --- a/engines/sherlock/scene.h +++ b/engines/sherlock/scene.h @@ -289,7 +289,7 @@ public: /** * Synchronize the data for a savegame */ - void synchronize(Serializer &s); + virtual void synchronize(Serializer &s); public: /** * Draw all objects and characters. diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index 31d497dfe7..3d4053f2b4 100644 --- a/engines/sherlock/tattoo/tattoo_scene.cpp +++ b/engines/sherlock/tattoo/tattoo_scene.cpp @@ -59,12 +59,20 @@ TattooScene::TattooScene(SherlockEngine *vm) : Scene(vm) { } bool TattooScene::loadScene(const Common::String &filename) { + TattooEngine &vm = *(TattooEngine *)_vm; + Events &events = *_vm->_events; Music &music = *_vm->_music; Sound &sound = *_vm->_sound; Talk &talk = *_vm->_talk; - TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; + // If we're going to the first game scene after the intro sequence, flag it as finished + if (vm._runningProlog && _currentScene == STARTING_GAME_SCENE) { + vm._runningProlog = false; + events.showCursor(); + talk._talkToAbort = false; + } + // Check if it's a scene we need to keep trakc track of how many times we've visited for (int idx = (int)_sceneTripCounters.size() - 1; idx >= 0; --idx) { if (_sceneTripCounters[idx]._sceneNumber == _currentScene) { @@ -949,6 +957,14 @@ void TattooScene::setNPCPath(int npc) { talk.talkTo(pathFile); } +void TattooScene::synchronize(Serializer &s) { + TattooEngine &vm = *(TattooEngine *)_vm; + Scene::synchronize(s); + + if (s.isLoading()) + vm._runningProlog = false; +} + } // End of namespace Tattoo } // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/tattoo_scene.h b/engines/sherlock/tattoo/tattoo_scene.h index ed5f46a6cf..8dab675cdb 100644 --- a/engines/sherlock/tattoo/tattoo_scene.h +++ b/engines/sherlock/tattoo/tattoo_scene.h @@ -109,6 +109,11 @@ protected: * Called by loadScene when the palette is loaded for Rose Tattoo */ virtual void paletteLoaded(); + + /** + * Synchronize the data for a savegame + */ + virtual void synchronize(Serializer &s); public: ImageFile *_mask, *_mask1; CAnimStream _activeCAnim; -- cgit v1.2.3