aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2013-10-15 23:36:03 +0200
committerWillem Jan Palenstijn2013-10-17 22:17:09 +0200
commit96ae25eca9492a113d8d89f85edec8a98632b3eb (patch)
treecdf09e210fc8213c83e89863ff3be8133592deb2
parent964fd22e4aebb30f22ff6358ea7140dec28c5d9a (diff)
downloadscummvm-rg350-96ae25eca9492a113d8d89f85edec8a98632b3eb.tar.gz
scummvm-rg350-96ae25eca9492a113d8d89f85edec8a98632b3eb.tar.bz2
scummvm-rg350-96ae25eca9492a113d8d89f85edec8a98632b3eb.zip
AVALANCHE: Remove a couple of useless variables from Animation. This breaks savegames.
-rw-r--r--engines/avalanche/animation.cpp17
-rw-r--r--engines/avalanche/animation.h2
2 files changed, 7 insertions, 12 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 71070b2af7..05c9026628 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -91,21 +91,22 @@ void AnimationType::init(byte spritenum, bool doCheck) {
_xLength = inf.readByte();
_yLength = inf.readByte();
_seq = inf.readByte();
- _size = inf.readUint16LE();
+ uint16 size = inf.readUint16LE();
+ assert (size > 6);
_fgBubbleCol = (Color)inf.readByte();
_bgBubbleCol = (Color)inf.readByte();
_acciNum = inf.readByte();
_animCount = 0; // = 1;
- _xWidth = _xLength / 8;
+ byte xWidth = _xLength / 8;
if ((_xLength % 8) > 0)
- _xWidth++;
+ xWidth++;
for (int i = 0; i < _frameNum; i++) {
_sil[_animCount] = new SilType[11 * (_yLength + 1)];
- _mani[_animCount] = new ManiType[_size - 6];
+ _mani[_animCount] = new ManiType[size - 6];
for (int j = 0; j <= _yLength; j++)
- inf.read((*_sil[_animCount])[j], _xWidth);
- inf.read(*_mani[_animCount], _size - 6);
+ inf.read((*_sil[_animCount])[j], xWidth);
+ inf.read(*_mani[_animCount], size - 6);
_animCount++;
}
@@ -367,9 +368,6 @@ void AnimationType::chatter() {
void AnimationType::remove() {
_animCount--;
- _xWidth = _xLength / 8;
- if ((_xLength % 8) > 0)
- _xWidth++;
for (int i = 0; i < _frameNum; i++) {
assert(_animCount > 0);
_animCount--;
@@ -1439,7 +1437,6 @@ void Animation::synchronize(Common::Serializer &sz) {
sz.syncAsByte(spr->_visible);
sz.syncAsByte(spr->_homing);
sz.syncAsByte(spr->_count);
- sz.syncAsByte(spr->_xWidth);
sz.syncAsByte(spr->_speedX);
sz.syncAsByte(spr->_speedY);
sz.syncAsByte(spr->_animCount);
diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h
index 5dbaa5afd7..74cf56ac85 100644
--- a/engines/avalanche/animation.h
+++ b/engines/avalanche/animation.h
@@ -43,11 +43,9 @@ enum Direction {
class AnimationType {
public:
// Former SpriteInfo structure
- byte _xWidth;
byte _xLength, _yLength;
ManiType *_mani[24];
SilType *_sil[24];
- uint16 _size; // The size of one picture.
// Former Stat structure
Common::String _name; // Name of character.