mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
parent
dc116a34af
commit
3959b96c9a
@ -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)) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user