From f2c1b182424f3e76ab72a770e8d3f059deb8e929 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 10 Jun 2009 12:15:50 +0000 Subject: Added variable to savegame format so that savegames can be correctly loaded from the ScummVM launcher svn-id: r41423 --- engines/cruise/function.cpp | 2 -- engines/cruise/saveload.cpp | 2 ++ engines/cruise/vars.cpp | 2 ++ engines/cruise/vars.h | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 7789cb6fb1..5194ad4269 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -774,8 +774,6 @@ int16 Op_UnfreezeParent(void) { return 0; } -int16 protectionCode = 0; - int16 Op_ProtectionFlag(void) { int16 temp = protectionCode; int16 newVar; diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index 0084b10cb9..1b929f6994 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -25,6 +25,7 @@ #include "cruise/cruise_main.h" #include "cruise/cruise.h" +#include "cruise/vars.h" #include "common/serializer.h" #include "common/savefile.h" @@ -143,6 +144,7 @@ static void syncBasicInfo(Common::Serializer &s) { s.syncAsSint16LE(flagCt); s.syncAsSint16LE(var41); s.syncAsSint16LE(playerMenuEnabled); + s.syncAsSint16LE(protectionCode); } static void syncBackgroundTable(Common::Serializer &s) { diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp index 3ea591ed43..94fd00cbfd 100644 --- a/engines/cruise/vars.cpp +++ b/engines/cruise/vars.cpp @@ -79,6 +79,8 @@ int16 volumeNumberOfEntry; int16 displayOn = 1; +int16 protectionCode = 0; + int16 globalVars[2000]; dataFileEntry filesDatabase[NUM_FILE_ENTRIES]; diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h index 7208a8bea0..4bb94ff691 100644 --- a/engines/cruise/vars.h +++ b/engines/cruise/vars.h @@ -183,6 +183,8 @@ extern int16 volumeNumberOfEntry; extern int16 displayOn; +extern int16 protectionCode; + #define NUM_FILE_ENTRIES 257 extern int16 globalVars[2000]; -- cgit v1.2.3