[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.h,1.27,1.28 saveload.cpp,1.124,1.125
Max Horn
fingolfin at users.sourceforge.net
Thu Dec 25 14:06:00 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv5710
Modified Files:
saveload.h saveload.cpp
Log Message:
Fix for bug #734154 (DIG: Savegame/Island names)
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- saveload.h 29 Nov 2003 13:58:17 -0000 1.27
+++ saveload.h 25 Dec 2003 22:05:02 -0000 1.28
@@ -32,7 +32,7 @@
// 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
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- saveload.cpp 22 Dec 2003 08:22:03 -0000 1.124
+++ saveload.cpp 25 Dec 2003 22:05:02 -0000 1.125
@@ -135,6 +135,7 @@
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 @@
if (type == rtInventory) {
ser->saveWord(_inventory[idx]);
}
+ if (type == rtObjectName && ser->getVersion() >= VER(25)) {
+ ser->saveWord(_newNames[idx]);
+ }
} else {
size = ser->loadUint32();
if (size) {
@@ -735,6 +739,9 @@
ser->loadBytes(getResourceAddress(type, idx), size);
if (type == rtInventory) {
_inventory[idx] = ser->loadWord();
+ }
+ if (type == rtObjectName && ser->getVersion() >= VER(25)) {
+ _newNames[idx] = ser->loadWord();
}
}
}
More information about the Scummvm-git-logs
mailing list