diff options
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/font.cpp | 2 | ||||
-rw-r--r-- | engines/cruise/function.cpp | 2 | ||||
-rw-r--r-- | engines/cruise/saveload.cpp | 23 | ||||
-rw-r--r-- | engines/cruise/vars.cpp | 1 | ||||
-rw-r--r-- | engines/cruise/vars.h | 1 |
5 files changed, 12 insertions, 17 deletions
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp index c63be30f77..80fb0e8a02 100644 --- a/engines/cruise/font.cpp +++ b/engines/cruise/font.cpp @@ -148,8 +148,6 @@ void initSystem() { preloadData[i].nofree = 0; } - lowMemory = 0; - doFade = 0; fadeFlag = 0; scroll = 0; diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index e727ac73cb..7af6b73238 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -606,7 +606,7 @@ int16 Op_InitializeState() { } int16 Op_GetlowMemory() { - return lowMemory; + return 0; } int16 Op_AniDir() { diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index a991c29583..a734db4b3b 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -182,11 +182,13 @@ static void syncFilesDatabase(Common::Serializer &s) { s.syncAsUint16LE(fe.resType); s.syncAsUint16LE(fe.height); - // TODO: Have a look at the saving/loading of this pointer + // Remember whether this file database was open or not. + // Upon loading, loadSavegameData uses this information + // in order to re-open the file databases accordingly. tmp = (fe.subData.ptr) ? 1 : 0; s.syncAsUint32LE(tmp); if (s.isLoading()) { - fe.subData.ptr = (uint8 *)tmp; + fe.subData.ptr = tmp ? (uint8 *)1 : 0; } s.syncAsSint16LE(fe.subData.index); @@ -195,11 +197,11 @@ static void syncFilesDatabase(Common::Serializer &s) { s.syncAsSint16LE(fe.subData.transparency); - // TODO: Have a look at the saving/loading of this pointer + // Treat fe.subData.ptrMask the same as fe.subData.ptr. tmp = (fe.subData.ptrMask) ? 1 : 0; s.syncAsUint32LE(tmp); if (s.isLoading()) { - fe.subData.ptrMask = (uint8 *)tmp; + fe.subData.ptrMask = tmp ? (uint8 *)1 : 0; } s.syncAsUint16LE(fe.subData.resourceType); @@ -806,7 +808,6 @@ Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName) } Common::Error loadSavegameData(int saveGameIdx) { - int lowMemorySave; Common::String saveName; cellStruct *currentcellHead; @@ -878,20 +879,19 @@ Common::Error loadSavegameData(int saveGameIdx) { lastAni[0] = 0; - lowMemorySave = lowMemory; - for (int i = 0; i < NUM_FILE_ENTRIES; i++) { if (filesDatabase[i].subData.ptr) { int j; int k; - for (j = i + 1; j < NUM_FILE_ENTRIES && filesDatabase[j].subData.ptr && !strcmp(filesDatabase[i].subData.name, filesDatabase[j].subData.name) && (filesDatabase[j].subData.index == (j - i)); j++) + for (j = i + 1; j < NUM_FILE_ENTRIES && + filesDatabase[j].subData.ptr && + !strcmp(filesDatabase[i].subData.name, filesDatabase[j].subData.name) && + (filesDatabase[j].subData.index == (j - i)); + j++) ; for (k = i; k < j; k++) { - if (filesDatabase[k].subData.ptrMask) - lowMemory = 0; - filesDatabase[k].subData.ptr = NULL; filesDatabase[k].subData.ptrMask = NULL; } @@ -908,7 +908,6 @@ Common::Error loadSavegameData(int saveGameIdx) { } i = j - 1; - lowMemory = lowMemorySave; } } diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp index f7c74c8e6d..9a59c8a714 100644 --- a/engines/cruise/vars.cpp +++ b/engines/cruise/vars.cpp @@ -31,7 +31,6 @@ uint8 selectColor = 3; uint8 titleColor = 2; uint8 subColor = 5; -int16 lowMemory; int16 scroll; int16 switchPal; char cmdLine[90]; diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h index 8bfcdc57d4..fe3f7d6303 100644 --- a/engines/cruise/vars.h +++ b/engines/cruise/vars.h @@ -59,7 +59,6 @@ extern uint8 selectColor; extern uint8 titleColor; extern uint8 subColor; -extern int16 lowMemory; extern int16 scroll; extern int16 switchPal; extern char cmdLine[90]; |