aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/assets.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2010-06-05 04:18:23 +0000
committerPaul Gilbert2010-06-05 04:18:23 +0000
commitb9065aa2d23d87c5da887ebe1f685230a4693827 (patch)
tree483b976d069e1c7df0a771d74447fde376072ce8 /engines/m4/assets.cpp
parent5686c251f09fa25432d5db8195ac1df2fcda88fb (diff)
downloadscummvm-rg350-b9065aa2d23d87c5da887ebe1f685230a4693827.tar.gz
scummvm-rg350-b9065aa2d23d87c5da887ebe1f685230a4693827.tar.bz2
scummvm-rg350-b9065aa2d23d87c5da887ebe1f685230a4693827.zip
Various bugfixes to the animation code - first Rex animation now plays, albeit in the wrong place
svn-id: r49437
Diffstat (limited to 'engines/m4/assets.cpp')
-rw-r--r--engines/m4/assets.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/m4/assets.cpp b/engines/m4/assets.cpp
index 91c371dec5..1f3cf278ae 100644
--- a/engines/m4/assets.cpp
+++ b/engines/m4/assets.cpp
@@ -210,11 +210,12 @@ void SpriteAsset::loadMadsSpriteAsset(MadsM4Engine *vm, Common::SeekableReadStre
_maxHeight = 0;
Common::SeekableReadStream *spriteStream = sprite.getItemStream(0);
-
- _assetType = spriteStream->readUint16LE();
- for (int i = 0; i < 18; i++) {
- spriteStream->readUint16LE();
- }
+ _mode = spriteStream->readByte();
+ spriteStream->skip(1);
+ int type1 = spriteStream->readUint16LE();
+ int type2 = spriteStream->readUint16LE();
+ _isBackground = (type1 != 0) && (type2 < 4);
+ spriteStream->skip(32);
_frameCount = spriteStream->readUint16LE();
// we skip the rest of the data
delete spriteStream;