From 179ef7adb2c7dd0eb790a58748ad374ce92b898d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 23 Apr 2015 18:54:07 +0200 Subject: SCI: fix Camelot save on map screen bug #6744 don't put restored script windows into _windowList[] --- engines/sci/engine/savegame.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 61f8058e45..d146cba204 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -772,10 +772,17 @@ void GfxPorts::saveLoadWithSerializer(Common::Serializer &s) { if (window->counterTillFree) { _freeCounter++; } else { - if (window->wndStyle & SCI_WINDOWMGR_STYLE_TOPMOST) - _windowList.push_front(window); - else - _windowList.push_back(window); + // we don't put the saved script windows into _windowList[], so that they aren't used + // by kernel functions. This is important and would cause issues otherwise. + // see Conquests of Camelot - bug #6744 - when saving on the map screen (room 103), + // restoring would result in a black window in place + // where the area name was displayed before + // In Sierra's SCI the behaviour is identical to us + // Sierra's SCI won't show those windows after restoring + // If this should cause issues in another game, we would have to add a flag to simply + // avoid any drawing operations for such windows + // We still have to restore script windows, because for example Conquests of Camelot + // will immediately delete windows, that were created before saving the game. } windowCount--; -- cgit v1.2.3