TINSEL: Bugfix for restoring DW1 savegames with a saved scene

This happens, for example, when restoring a savegame of the dragon summoning book close-up. After restoring, you couldn't leave the close up.
This commit is contained in:
Paul Gilbert 2011-10-18 19:47:45 +11:00
parent 3b71a3a7fb
commit ca7bc71846
2 changed files with 8 additions and 1 deletions

View File

@ -84,6 +84,8 @@ extern void syncPolyInfo(Common::Serializer &s);
extern int sceneCtr;
extern bool ASceneIsSaved;
//----------------- LOCAL DEFINES --------------------
struct SaveGameHeader {
@ -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)

View File

@ -83,7 +83,7 @@ extern SRSTATE SRstate;
// FIXME: Avoid non-const global vars
static bool ASceneIsSaved = false;
bool ASceneIsSaved = false;
static int savedSceneCount = 0;