WAGE: Add World's _signature

This commit is contained in:
Alexander Tkachev 2016-07-27 17:38:43 +06:00
parent 5d804f379c
commit 6b21b1f893
3 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -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)

View File

@ -92,6 +92,7 @@ public:
Patterns *_patterns;
Scene *_storageScene;
Chr *_player;
int _signature;
//List<MoveListener> moveListeners;
Common::String *_gameOverMessage;