[Scummvm-cvs-logs] SF.net SVN: scummvm: [26859] scummvm/trunk/engines/agos/icons.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Thu May 17 11:02:02 CEST 2007
Revision: 26859
http://scummvm.svn.sourceforge.net/scummvm/?rev=26859&view=rev
Author: kirben
Date: 2007-05-17 02:02:01 -0700 (Thu, 17 May 2007)
Log Message:
-----------
Completely revert last changes in icon code.
Modified Paths:
--------------
scummvm/trunk/engines/agos/icons.cpp
Modified: scummvm/trunk/engines/agos/icons.cpp
===================================================================
--- scummvm/trunk/engines/agos/icons.cpp 2007-05-17 09:00:14 UTC (rev 26858)
+++ scummvm/trunk/engines/agos/icons.cpp 2007-05-17 09:02:01 UTC (rev 26859)
@@ -72,7 +72,7 @@
// Decode RLE planar icon data
i = src;
o = icon_pln;
- while (o < &icon_pln[width * height / 2]) {
+ while (o < &icon_pln[288]) {
x = *i++;
if (x < 128) {
do {
@@ -94,13 +94,13 @@
}
// Translate planar data to chunky (very slow method)
- for (y = 0; y < height; y++) {
- for (x = 0; x < width; x++) {
+ for (y = 0; y < 24; y++) {
+ for (x = 0; x < 24; x++) {
byte pixel =
- (srcPtr[((height * 0 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 1 : 0)
- | (srcPtr[((height * 1 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 2 : 0)
- | (srcPtr[((height * 2 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 4 : 0)
- | (srcPtr[((height * 3 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 8 : 0);
+ (srcPtr[(( y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 1 : 0)
+ | (srcPtr[((24 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 2 : 0)
+ | (srcPtr[((48 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 4 : 0)
+ | (srcPtr[((72 + y) * 3) + (x >> 3)] & (1 << (7 - (x & 7))) ? 8 : 0);
if (pixel)
dst[x] = pixel | base;
}
@@ -207,7 +207,7 @@
} else {
src = _iconFilePtr;
src += READ_LE_UINT16(&((uint16 *)src)[icon]);
- decompressIcon(dst, src, 24, 24, 224, _dxSurfacePitch);
+ decompressIcon(dst, src, 24, 12, 224, _dxSurfacePitch);
}
_lockWord &= ~0x8000;
@@ -226,9 +226,7 @@
uint8 color = dst[0] & 0xF0;
if (getPlatform() == Common::kPlatformAmiga) {
// TODO
- src = _iconFilePtr;
- src += READ_BE_UINT16(&((uint16 *)src)[icon]);
- //decompressIconPlanar(dst, src, 24, 10, color, _dxSurfacePitch);
+ return;
} else {
src = _iconFilePtr;
src += READ_LE_UINT16(&((uint16 *)src)[icon]);
@@ -256,7 +254,7 @@
} else {
src = _iconFilePtr;
src += READ_LE_UINT16(&((uint16 *)src)[icon]);
- decompressIcon(dst, src, 24, 24, color, _dxSurfacePitch);
+ decompressIcon(dst, src, 24, 12, color, _dxSurfacePitch);
}
_lockWord &= ~0x8000;
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