AVALANCHE: Remove a couple of useless variables from Animation. This breaks savegames.

This commit is contained in:
Strangerke 2013-10-15 23:36:03 +02:00 committed by Willem Jan Palenstijn
parent 964fd22e4a
commit 96ae25eca9
2 changed files with 7 additions and 12 deletions

View File

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

View File

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