aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/animation.cpp')
-rw-r--r--engines/mads/animation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index ed274eb4a3..fec7f74423 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -101,16 +101,19 @@ void AnimMessage::load(Common::SeekableReadStream *f) {
void AnimFrameEntry::load(Common::SeekableReadStream *f, bool uiFlag) {
if (uiFlag) {
f->skip(2);
+ _frameNumber = -1; // Unused
_seqIndex = f->readByte();
_spriteSlot._spritesIndex = f->readByte();
- _spriteSlot._frameNumber = f->readUint16LE();
+ _spriteSlot._frameNumber = (int8)f->readByte();
+ f->skip(1);
_spriteSlot._position.x = f->readSint16LE();
_spriteSlot._position.y = f->readSint16LE();
} else {
_frameNumber = f->readUint16LE();
_seqIndex = f->readByte();
_spriteSlot._spritesIndex = f->readByte();
- _spriteSlot._frameNumber = f->readUint16LE();
+ uint frame = f->readUint16LE();
+ _spriteSlot._frameNumber = (frame < 0x80) ? frame : -(frame & 0x7f);
_spriteSlot._position.x = f->readSint16LE();
_spriteSlot._position.y = f->readSint16LE();
_spriteSlot._depth = f->readSByte();