[Scummvm-cvs-logs] SF.net SVN: scummvm:[43649] scummvm/trunk/engines/scumm/he
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sat Aug 22 15:32:57 CEST 2009
Revision: 43649
http://scummvm.svn.sourceforge.net/scummvm/?rev=43649&view=rev
Author: Kirben
Date: 2009-08-22 13:32:56 +0000 (Sat, 22 Aug 2009)
Log Message:
-----------
Fix endian regression, when clearing the buffer of non-cursor images.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/wiz_he.cpp
scummvm/trunk/engines/scumm/he/wiz_he.h
Modified: scummvm/trunk/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.cpp 2009-08-22 13:24:17 UTC (rev 43648)
+++ scummvm/trunk/engines/scumm/he/wiz_he.cpp 2009-08-22 13:32:56 UTC (rev 43649)
@@ -40,6 +40,7 @@
_imagesNum = 0;
memset(&_images, 0, sizeof(_images));
memset(&_polygons, 0, sizeof(_polygons));
+ _cursorImage = false;
_rectOverrideEnabled = false;
}
@@ -1503,8 +1504,13 @@
if (_vm->_bitDepth == 2) {
uint8 *tmpPtr = dst;
for (uint i = 0; i < height; i++) {
- for (uint j = 0; j < width; j++)
- WRITE_UINT16(tmpPtr + j * 2, transColor);
+ for (uint j = 0; j < width; j++) {
+ if (_cursorImage) {
+ WRITE_UINT16(tmpPtr + j * 2, transColor);
+ } else {
+ WRITE_LE_UINT16(tmpPtr + j * 2, transColor);
+ }
+ }
tmpPtr += width * 2;
}
} else {
@@ -1967,8 +1973,7 @@
y_acc += pra->y_step;
if (bitDepth == 2) {
if (transColor == -1 || transColor != READ_LE_UINT16(src + src_offs * 2)) {
- //if (transColor == -1 || READ_UINT16(dstPtr) != transColor)
- writeColor(dstPtr, dstType, READ_LE_UINT16(src + src_offs * 2));
+ writeColor(dstPtr, dstType, READ_LE_UINT16(src + src_offs * 2));
}
} else {
if (transColor == -1 || transColor != src[src_offs])
@@ -2012,7 +2017,9 @@
}
const Common::Rect *r = NULL;
+ _cursorImage = true;
uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette));
+ _cursorImage = false;
int32 cw, ch;
getWizImageDim(resId, 0, cw, ch);
Modified: scummvm/trunk/engines/scumm/he/wiz_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.h 2009-08-22 13:24:17 UTC (rev 43648)
+++ scummvm/trunk/engines/scumm/he/wiz_he.h 2009-08-22 13:32:56 UTC (rev 43649)
@@ -165,6 +165,7 @@
void clearWizBuffer();
Common::Rect _rectOverride;
+ bool _cursorImage;
bool _rectOverrideEnabled;
void polygonClear();
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