[Scummvm-cvs-logs] SF.net SVN: scummvm: [31633] scummvm/trunk/engines/kyra/screen.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Apr 21 01:13:39 CEST 2008
Revision: 31633
http://scummvm.svn.sourceforge.net/scummvm/?rev=31633&view=rev
Author: lordhoto
Date: 2008-04-20 16:13:38 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
Fixed yet another two long standing bugs in Screen::encodeShape.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/screen.cpp
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2008-04-20 22:24:24 UTC (rev 31632)
+++ scummvm/trunk/engines/kyra/screen.cpp 2008-04-20 23:13:38 UTC (rev 31633)
@@ -2242,6 +2242,8 @@
src = _animBlockPtr;
memcpy(dst, src, shapeSize2);
dst = newShape;
+ if (_vm->gameFlags().useAltShapeHeader)
+ dst += 2;
flags = READ_LE_UINT16(dst);
flags |= 2;
WRITE_LE_UINT16(dst, flags);
@@ -2326,7 +2328,8 @@
byte *fromBackUp = from;
byte *toBackUp = to;
--to;
- for (int i = 0; i < (fromPtrEnd - from); ++i) {
+ const int checkSize = fromPtrEnd - from;
+ for (int i = 0; i < checkSize; ++i) {
if (*from++ != *to++)
break;
}
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