aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2009-06-10 12:15:50 +0000
committerPaul Gilbert2009-06-10 12:15:50 +0000
commitf2c1b182424f3e76ab72a770e8d3f059deb8e929 (patch)
tree683f94877e9d5ae8720af255c7f9ecbdcef3b1e2 /engines
parentff72f8531cea80be7606e338dbdbd6413b298661 (diff)
downloadscummvm-rg350-f2c1b182424f3e76ab72a770e8d3f059deb8e929.tar.gz
scummvm-rg350-f2c1b182424f3e76ab72a770e8d3f059deb8e929.tar.bz2
scummvm-rg350-f2c1b182424f3e76ab72a770e8d3f059deb8e929.zip
Added variable to savegame format so that savegames can be correctly loaded from the ScummVM launcher
svn-id: r41423
Diffstat (limited to 'engines')
-rw-r--r--engines/cruise/function.cpp2
-rw-r--r--engines/cruise/saveload.cpp2
-rw-r--r--engines/cruise/vars.cpp2
-rw-r--r--engines/cruise/vars.h2
4 files changed, 6 insertions, 2 deletions
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];