aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-12-25 22:05:02 +0000
committerMax Horn2003-12-25 22:05:02 +0000
commit3959b96c9a84829e931a53a99846c04f0b1c792a (patch)
treec5dadb84f2582e38de9d83f9715489317c7b188b /scumm
parentdc116a34af507cc13fc9a9cd71057c5b23029804 (diff)
downloadscummvm-rg350-3959b96c9a84829e931a53a99846c04f0b1c792a.tar.gz
scummvm-rg350-3959b96c9a84829e931a53a99846c04f0b1c792a.tar.bz2
scummvm-rg350-3959b96c9a84829e931a53a99846c04f0b1c792a.zip
Fix for bug #734154 (DIG: Savegame/Island names)
svn-id: r11928
Diffstat (limited to 'scumm')
-rw-r--r--scumm/saveload.cpp7
-rw-r--r--scumm/saveload.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index d477063ef5..fd27ed2a24 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -135,6 +135,7 @@ bool ScummEngine::loadState(int slot, bool compat, SaveFileManager *mgr) {
CHECK_HEAP
closeRoom();
memset(_inventory, 0, sizeof(_inventory[0]) * _numInventory);
+ memset(_newNames, 0, sizeof(_newNames[0]) * _numNewNames);
/* Nuke all resources */
for (i = rtFirst; i <= rtLast; i++)
@@ -728,6 +729,9 @@ void ScummEngine::saveLoadResource(Serializer *ser, int type, int idx) {
if (type == rtInventory) {
ser->saveWord(_inventory[idx]);
}
+ if (type == rtObjectName && ser->getVersion() >= VER(25)) {
+ ser->saveWord(_newNames[idx]);
+ }
} else {
size = ser->loadUint32();
if (size) {
@@ -736,6 +740,9 @@ void ScummEngine::saveLoadResource(Serializer *ser, int type, int idx) {
if (type == rtInventory) {
_inventory[idx] = ser->loadWord();
}
+ if (type == rtObjectName && ser->getVersion() >= VER(25)) {
+ _newNames[idx] = ser->loadWord();
+ }
}
}
} else if (res.mode[type] == 2 && ser->getVersion() >= VER(23)) {
diff --git a/scumm/saveload.h b/scumm/saveload.h
index 89f5978fe0..7c330d4f4c 100644
--- a/scumm/saveload.h
+++ b/scumm/saveload.h
@@ -32,7 +32,7 @@ namespace Scumm {
// Can be useful for other ports too :)
#define VER(x) x
-#define CURRENT_VER 24
+#define CURRENT_VER 25
// To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,
// we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC