diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/lol.h | 7 | ||||
-rw-r--r-- | engines/kyra/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/saveload_lol.cpp | 21 |
3 files changed, 7 insertions, 23 deletions
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index c6d05c45d1..e44857ec2b 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -118,11 +118,11 @@ struct LoLMonsterInPlay { int8 shiftStep; uint16 destX; uint16 destY; + uint8 destDirection; int8 hitOffsX; int8 hitOffsY; uint8 currentSubFrame; - uint8 mode; int8 fightCurTick; uint8 id; @@ -130,7 +130,6 @@ struct LoLMonsterInPlay { uint8 facing; uint16 flags; uint16 damageReceived; - //uint8 field_1C; int16 hitPoints; uint8 speedTick; uint8 type; @@ -152,10 +151,6 @@ struct ItemInPlay { int8 level; uint16 itemPropertyIndex; uint16 shpCurFrame_flg; - uint8 destDirection; - int8 hitOffsX; - int8 hitOffsY; - uint8 currentSubFrame; }; struct ItemProperty { diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index 9fd470f740..f4fd4668ee 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -29,7 +29,7 @@ #include "graphics/thumbnail.h" #include "graphics/surface.h" -#define CURRENT_SAVE_VERSION 16 +#define CURRENT_SAVE_VERSION 17 #define GF_FLOPPY (1 << 0) #define GF_TALKIE (1 << 1) diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp index 2b7236f48b..3edc4759ca 100644 --- a/engines/kyra/saveload_lol.cpp +++ b/engines/kyra/saveload_lol.cpp @@ -102,8 +102,8 @@ Common::Error LoLEngine::loadGameState(int slot) { } } - if (!header.originalSave) - in.read(_wllAutomapData, 80); + if (header.version < 17) + in.skip(80); _currentBlock = in.readUint16(); _partyPosX = in.readUint16(); @@ -198,12 +198,8 @@ Common::Error LoLEngine::loadGameState(int slot) { t->level = in.readSByte(); t->itemPropertyIndex = in.readUint16(); t->shpCurFrame_flg = in.readUint16(); - if (!header.originalSave) { - t->destDirection = in.readByte(); - t->hitOffsX = in.readSByte(); - t->hitOffsY = in.readSByte(); - t->currentSubFrame = in.readByte(); - } + if (header.version < 17) + in.skip(4); } for (int i = 0; i < 1024; i++) { @@ -385,9 +381,7 @@ Common::Error LoLEngine::saveGameStateIntern(int slot, const char *saveName, con for (int ii = 0; ii < 5; ii++) out->writeByte(c->characterUpdateDelay[ii]); } - - out->write(_wllAutomapData, 80); - + out->writeUint16BE(_currentBlock); out->writeUint16BE(_partyPosX); out->writeUint16BE(_partyPosY); @@ -432,11 +426,6 @@ Common::Error LoLEngine::saveGameStateIntern(int slot, const char *saveName, con out->writeSByte(t->level); out->writeUint16BE(t->itemPropertyIndex); out->writeUint16BE(t->shpCurFrame_flg); - - out->writeByte(t->destDirection); - out->writeSByte(t->hitOffsX); - out->writeSByte(t->hitOffsY); - out->writeByte(t->currentSubFrame); } addLevelItems(); |