diff --git a/engines/wage/saveload.cpp b/engines/wage/saveload.cpp index 2c4a23f2d3e..60852551b7c 100644 --- a/engines/wage/saveload.cpp +++ b/engines/wage/saveload.cpp @@ -138,7 +138,7 @@ int WageEngine::saveGame(const Common::String &fileName, const Common::String &d out->writeSint32LE(objsHexOffset); // Unique 8-byte World Signature - out->writeSint32LE(0); //TODO: 8-byte ints? seriously? + out->writeSint32LE(_world->_signature); //8-byte ints? seriously? (uses 4 bytes in java code too) Chr *player = _world->_player; Context &playerContext = player->_context; diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 0e40e114b4e..8b89060da31 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -69,6 +69,7 @@ World::World(WageEngine *engine) { _globalScript = nullptr; _player = nullptr; + _signature = 0; _weaponMenuDisabled = true; @@ -146,7 +147,8 @@ bool World::loadWorld(Common::MacResManager *resMan) { res = resMan->getResource(MKTAG('V','E','R','S'), resArray[0]); - res->skip(10); + _signature = res->readSint32LE(); + res->skip(6); byte b = res->readByte(); _weaponMenuDisabled = (b != 0); if (b != 0 && b != 1) diff --git a/engines/wage/world.h b/engines/wage/world.h index 9eac072e86d..918616c9c11 100644 --- a/engines/wage/world.h +++ b/engines/wage/world.h @@ -92,6 +92,7 @@ public: Patterns *_patterns; Scene *_storageScene; Chr *_player; + int _signature; //List moveListeners; Common::String *_gameOverMessage;