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/saveload.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/cruise/saveload.cpp') 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) { -- cgit v1.2.3 From 2f3e5f11cb0f384c81cf37c716c66c33976634d2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 14 Jun 2009 03:39:30 +0000 Subject: Beginnings of music support for Cruise, based on the cine engine sound code (note that the music played isn't yet correct, though) svn-id: r41506 --- engines/cruise/saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/cruise/saveload.cpp') diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index 1b929f6994..6fd2034c5e 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -610,7 +610,7 @@ static void syncCT(Common::Serializer &s) { static void DoSync(Common::Serializer &s) { syncBasicInfo(s); - _vm->music().doSync(s); + _vm->sound().doSync(s); syncPalette(s, newPal); syncPalette(s, workpal); -- cgit v1.2.3 From 4f622ab295f53ad9d2417d1d1ee2b1fddfa98298 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 20 Jun 2009 08:15:01 +0000 Subject: Added proper saving of music state to savegames so music resumes when a savegame is loaded. svn-id: r41702 --- engines/cruise/saveload.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/cruise/saveload.cpp') diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index 6fd2034c5e..d151950c5e 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -820,6 +820,7 @@ Common::Error loadSavegameData(int saveGameIdx) { printInfoBlackBox("Loading in progress..."); initVars(); + _vm->sound().stopMusic(); // Skip over the savegame header CruiseSavegameHeader header; @@ -928,8 +929,6 @@ Common::Error loadSavegameData(int saveGameIdx) { currentcellHead = currentcellHead->next; } - //TODO: here, restart music - if (strlen(currentCtpName)) { loadCtFromSave = 1; initCt(currentCtpName); -- cgit v1.2.3 From 3190bf68f2638f51a3aceb3d3d24ca0d405e6be6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 3 Jul 2009 06:19:20 +0000 Subject: Bugfix for loading savegames where the active resource file database isn't completely filled svn-id: r42047 --- engines/cruise/saveload.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/cruise/saveload.cpp') diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index d151950c5e..7fcc5ecb1b 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -898,11 +898,15 @@ Common::Error loadSavegameData(int saveGameIdx) { printf("Unsupported mono file load!\n"); ASSERT(0); //loadFileMode1(filesDatabase[j].subData.name,filesDatabase[j].subData.var4); - } else */{ + } else */ + if (strlen(filesDatabase[i].subData.name) > 0) { loadFileRange(filesDatabase[i].subData.name, filesDatabase[i].subData.index, i, j - i); - i = j - 1; + } else { + filesDatabase[i].subData.ptr = NULL; + filesDatabase[i].subData.ptrMask = NULL; } + i = j - 1; lowMemory = lowMemorySave; } } -- cgit v1.2.3