[Scummvm-cvs-logs] SF.net SVN: scummvm:[41187] scummvm/branches/gsoc2009-16bit/engines/scumm/ he
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Fri Jun 5 03:20:39 CEST 2009
Revision: 41187
http://scummvm.svn.sourceforge.net/scummvm/?rev=41187&view=rev
Author: Kirben
Date: 2009-06-05 01:20:39 +0000 (Fri, 05 Jun 2009)
Log Message:
-----------
Update o72_getPixel() for 16bit color, and cleanup.
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v72he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.h
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v72he.cpp 2009-06-05 01:12:52 UTC (rev 41186)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v72he.cpp 2009-06-05 01:20:39 UTC (rev 41187)
@@ -1572,7 +1572,7 @@
}
void ScummEngine_v72he::o72_getPixel() {
- byte area;
+ uint16 area;
int y = pop();
int x = pop();
@@ -1587,11 +1587,17 @@
switch (subOp) {
case 9: // HE 100
case 218:
- area = *vs->getBackPixels(x, y - vs->topline);
+ if (_game.features & GF_16BIT_COLOR)
+ area = READ_UINT16(vs->getBackPixels(x, y - vs->topline));
+ else
+ area = *vs->getBackPixels(x, y - vs->topline);
break;
case 8: // HE 100
case 219:
- area = *vs->getPixels(x, y - vs->topline);
+ if (_game.features & GF_16BIT_COLOR)
+ area = READ_UINT16(vs->getPixels(x, y - vs->topline));
+ else
+ area = *vs->getPixels(x, y - vs->topline);
break;
default:
error("o72_getPixel: default case %d", subOp);
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.cpp 2009-06-05 01:12:52 UTC (rev 41186)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.cpp 2009-06-05 01:20:39 UTC (rev 41187)
@@ -369,7 +369,7 @@
}
}
-void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) {
+void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *xmapPtr) {
Common::Rect r1, r2;
if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) {
dst += r2.top * dstPitch + r2.left * 2;
@@ -382,7 +382,7 @@
r1.translate(dx, 0);
}
if (xmapPtr) {
- decompress16BitWizImage<kWizXMap>(dst, dstPitch, dstType, src, r1, flags, palPtr, xmapPtr);
+ decompress16BitWizImage<kWizXMap>(dst, dstPitch, dstType, src, r1, flags, xmapPtr);
} else {
decompress16BitWizImage<kWizCopy>(dst, dstPitch, dstType, src, r1, flags);
}
@@ -608,7 +608,7 @@
}
template <int type>
-void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) {
+void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr) {
const uint8 *dataPtr, *dataPtrNext;
uint8 code;
uint8 *dstPtr, *dstPtrNext;
@@ -617,9 +617,6 @@
if (type == kWizXMap) {
assert(xmapPtr != 0);
}
- if (type == kWizRMap) {
- assert(palPtr != 0);
- }
dstPtr = dst;
dataPtr = src;
@@ -683,7 +680,7 @@
write16BitColor<type>(dstPtr, dataPtr, dstType, xmapPtr);
dstPtr += dstInc;
}
- dataPtr+= 2;
+ dataPtr += 2;
} else {
code = (code >> 2) + 1;
if (xoff > 0) {
@@ -1464,7 +1461,7 @@
// TODO: Unknown image type
break;
case 5:
- copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr);
+ copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, xmapPtr);
break;
default:
error("drawWizImage: Unhandled wiz compression type %d", comp);
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.h 2009-06-05 01:12:52 UTC (rev 41186)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.h 2009-06-05 01:20:39 UTC (rev 41187)
@@ -210,9 +210,9 @@
static void copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP);
static void copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth);
static void copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitdepth);
- static void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr);
+ static void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *xmapPtr);
static void copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor);
- template<int type> static void decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL);
+ template<int type> static void decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr = NULL);
template<int type> static void decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth);
template<int type> static void decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitdepth);
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