Skip to content

Commit

Permalink
TINSEL: Bugfix for restoring DW1 savegames with a saved scene
Browse files Browse the repository at this point in the history
This happens, for example, when restoring a savegame of the dragon summoning book close-up. After restoring, you couldn't leave the close up.
  • Loading branch information
dreammaster committed Oct 18, 2011
1 parent 3b71a3a commit ca7bc71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions engines/tinsel/saveload.cpp
Expand Up @@ -84,6 +84,8 @@ extern void syncPolyInfo(Common::Serializer &s);

extern int sceneCtr;

extern bool ASceneIsSaved;

//----------------- LOCAL DEFINES --------------------

struct SaveGameHeader {
Expand Down Expand Up @@ -438,6 +440,11 @@ static void DoSync(Common::Serializer &s) {
SAVED_DATA *sdPtr = SaveSceneSsData;
for (int i = 0; i < *SaveSceneSsCount; ++i, ++sdPtr)
syncSavedData(s, *sdPtr);

// Flag that there is a saved scene to return to. Note that in this context 'saved scene'
// is a stored scene to return to from another scene, such as from the Summoning Book close-up
// in Discworld 1 to whatever scene Rincewind was in prior to that
ASceneIsSaved = true;
}

if (!TinselV2)
Expand Down
2 changes: 1 addition & 1 deletion engines/tinsel/savescn.cpp
Expand Up @@ -83,7 +83,7 @@ extern SRSTATE SRstate;

// FIXME: Avoid non-const global vars

static bool ASceneIsSaved = false;
bool ASceneIsSaved = false;

static int savedSceneCount = 0;

Expand Down

0 comments on commit ca7bc71

Please sign in to comment.