[Scummvm-cvs-logs] SF.net SVN: scummvm: [21255] scummvm/trunk/engines/lure
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Mon Mar 13 03:22:04 CET 2006
Revision: 21255
Author: dreammaster
Date: 2006-03-13 03:20:58 -0800 (Mon, 13 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21255&view=rev
Log Message:
-----------
Add proper handling for animations with frame offset tables during decoding
Modified Paths:
--------------
scummvm/trunk/engines/lure/hotspots.cpp
scummvm/trunk/engines/lure/luredefs.h
Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp 2006-03-13 11:18:18 UTC (rev 21254)
+++ scummvm/trunk/engines/lure/hotspots.cpp 2006-03-13 11:20:58 UTC (rev 21255)
@@ -171,7 +171,15 @@
MemoryBlock &mDest = _frames->data();
for (uint16 frameCtr = 0; frameCtr < _numFrames; ++frameCtr, ++headerEntry) {
-
+
+ if ((newRecord->flags & PIXELFLAG_HAS_TABLE) != 0) {
+ // For animations with an offset table, set the source point for each frame
+ uint16 frameOffset = *((uint16 *) (src->data() + ((frameCtr + 1) * sizeof(uint16)))) + 0x40;
+ if (frameOffset + _height * (_width / 2) > dest->size())
+ error("Invalid frame offset in animation %x", newRecord->animRecordId);
+ pSrc = dest->data() + frameOffset;
+ }
+
// Copy over the frame, applying the colour offset to each nibble
for (uint16 yPos = 0; yPos < _height; ++yPos) {
pDest = mDest.data() + (yPos * _numFrames + frameCtr) * _width;
Modified: scummvm/trunk/engines/lure/luredefs.h
===================================================================
--- scummvm/trunk/engines/lure/luredefs.h 2006-03-13 11:18:18 UTC (rev 21254)
+++ scummvm/trunk/engines/lure/luredefs.h 2006-03-13 11:20:58 UTC (rev 21255)
@@ -202,6 +202,9 @@
// Misc constants
#define VOICE_ANIM_ID 0x5810
+// Pixel record flags
+#define PIXELFLAG_HAS_TABLE 4
+
} // End of namespace Lure
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list