aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorathrxx2011-12-13 22:00:07 +0100
committerathrxx2011-12-28 00:01:32 +0100
commitcbfdd227a173238cd7069264c2f83bdf247ca1d6 (patch)
treea971714d733b9e2abc0da884ebb2e939aa8ead90 /engines/kyra
parent75c0036925107a844d211854f7194aebcbedd718 (diff)
downloadscummvm-rg350-cbfdd227a173238cd7069264c2f83bdf247ca1d6.tar.gz
scummvm-rg350-cbfdd227a173238cd7069264c2f83bdf247ca1d6.tar.bz2
scummvm-rg350-cbfdd227a173238cd7069264c2f83bdf247ca1d6.zip
KYRA: (LOL) - minor reduction of save file size
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/lol.h7
-rw-r--r--engines/kyra/saveload.cpp2
-rw-r--r--engines/kyra/saveload_lol.cpp21
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();