aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-27 17:38:43 +0600
committerAlexander Tkachev2016-07-27 17:38:43 +0600
commit6b21b1f89365bd77494940ec918212069238cc70 (patch)
tree3439d7224b771609c3e058b83eeb076b2c2ede8d /engines/wage
parent5d804f379ce77f0dd5eb43cfa5c2d18aa2de3585 (diff)
downloadscummvm-rg350-6b21b1f89365bd77494940ec918212069238cc70.tar.gz
scummvm-rg350-6b21b1f89365bd77494940ec918212069238cc70.tar.bz2
scummvm-rg350-6b21b1f89365bd77494940ec918212069238cc70.zip
WAGE: Add World's _signature
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/saveload.cpp2
-rw-r--r--engines/wage/world.cpp4
-rw-r--r--engines/wage/world.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/engines/wage/saveload.cpp b/engines/wage/saveload.cpp
index 2c4a23f2d3..60852551b7 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 0e40e114b4..8b89060da3 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 9eac072e86..918616c9c1 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<MoveListener> moveListeners;
Common::String *_gameOverMessage;