[Scummvm-cvs-logs] SF.net SVN: scummvm: [27683] scummvm/trunk/engines/parallaction/animation. cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Jun 23 23:42:46 CEST 2007
Revision: 27683
http://scummvm.svn.sourceforge.net/scummvm/?rev=27683&view=rev
Author: peres001
Date: 2007-06-23 14:42:45 -0700 (Sat, 23 Jun 2007)
Log Message:
-----------
Now clipping frame # to avoid crashes because of bad behavior of game scripts.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/animation.cpp
Modified: scummvm/trunk/engines/parallaction/animation.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/animation.cpp 2007-06-23 19:04:15 UTC (rev 27682)
+++ scummvm/trunk/engines/parallaction/animation.cpp 2007-06-23 21:42:45 UTC (rev 27683)
@@ -166,15 +166,19 @@
if ((v18->_flags & kFlagsActive) && ((v18->_flags & kFlagsRemove) == 0)) {
v14._width = v18->width();
v14._height = v18->height();
- v14._data0 = v18->getFrameData(v18->_frame);
-// v14._data1 = v18->_cnv->field_8[v18->_frame];
+ int16 frame = CLIP((int)v18->_frame, 0, v18->getFrameNum()-1);
+
+ v14._data0 = v18->getFrameData(frame);
+// v14._data1 = v18->_cnv->field_8[frame];
+
if (v18->_flags & kFlagsNoMasked)
_si = 3;
else
_si = _vm->_gfx->queryMask(v18->_top + v18->height());
- debugC(9, kDebugLocation, "jobDisplayAnimations(%s, x:%i, y:%i, z:%i, w:%i, h:%i, %p)", v18->_label._text, v18->_left, v18->_top, _si, v14._width, v14._height, v14._data0);
+ debugC(9, kDebugLocation, "jobDisplayAnimations(%s, x:%i, y:%i, z:%i, w:%i, h:%i, f:%i/%i, %p)", v18->_label._text, v18->_left, v18->_top, _si, v14._width, v14._height,
+ frame, v18->getFrameNum(), v14._data0);
_vm->_gfx->blitCnv(&v14, v18->_left, v18->_top, _si, Gfx::kBitBack);
}
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