From 24e40281742877f88b235838a25e6a1e2ba70f33 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 1 Feb 2014 18:08:07 -0500 Subject: VOYEUR: Improvements for savegame support --- engines/voyeur/files_threads.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 0b4cdd2f99..94ef0f63ef 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -349,7 +349,6 @@ void ThreadResource::parsePlayCommands() { _vm->_voy._audioHotspotTimes.reset(); _vm->_voy._evidenceHotspotTimes.reset(); Common::fill(&_vm->_voy._roomHotspotsEnabled[0], &_vm->_voy._roomHotspotsEnabled[20], false); - byte *dataP = _playCommandsPtr; int v2, v3; PictureResource *pic; @@ -1749,6 +1748,14 @@ void ThreadResource::doAptAnim(int mode) { void ThreadResource::synchronize(Common::Serializer &s) { s.syncAsSint16LE(_aptPos.x); s.syncAsSint16LE(_aptPos.y); + + int sceneId = _threadId; + int stackId = _controlIndex; + s.syncAsSint16LE(sceneId); + s.syncAsSint16LE(stackId); + + if (s.isLoading() && (sceneId != _threadId || stackId != _controlIndex)) + goToState(stackId, sceneId); } } // End of namespace Voyeur -- cgit v1.2.3