[Scummvm-cvs-logs] SF.net SVN: scummvm:[44336] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Sep 25 11:13:34 CEST 2009
Revision: 44336
http://scummvm.svn.sourceforge.net/scummvm/?rev=44336&view=rev
Author: fingolfin
Date: 2009-09-25 09:13:33 +0000 (Fri, 25 Sep 2009)
Log Message:
-----------
SCUMM: Rename _bitDepth to _bytesPerPixel
Modified Paths:
--------------
scummvm/trunk/engines/scumm/actor.cpp
scummvm/trunk/engines/scumm/akos.cpp
scummvm/trunk/engines/scumm/base-costume.cpp
scummvm/trunk/engines/scumm/charset.cpp
scummvm/trunk/engines/scumm/charset.h
scummvm/trunk/engines/scumm/cursor.cpp
scummvm/trunk/engines/scumm/gfx.cpp
scummvm/trunk/engines/scumm/he/animation_he.cpp
scummvm/trunk/engines/scumm/he/wiz_he.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/scumm.h
Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/actor.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -2451,7 +2451,7 @@
uint8 *dst2 = pvs->getBackPixels(0, pvs->topline);
switch (comp) {
case 1:
- Wiz::copyAuxImage(dst1, dst2, axfd + 10, pvs->pitch, pvs->h, x, y, w, h, _bitDepth);
+ Wiz::copyAuxImage(dst1, dst2, axfd + 10, pvs->pitch, pvs->h, x, y, w, h, _bytesPerPixel);
break;
default:
error("unimplemented compression type %d", comp);
Modified: scummvm/trunk/engines/scumm/akos.cpp
===================================================================
--- scummvm/trunk/engines/scumm/akos.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/akos.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -602,7 +602,7 @@
pcolor = _shadow_table[pcolor];
}
}
- if (_vm->_bitDepth == 2) {
+ if (_vm->_bytesPerPixel == 2) {
WRITE_UINT16(dst, pcolor);
} else {
*dst = pcolor;
@@ -626,7 +626,7 @@
if (v1.x < 0 || v1.x >= v1.boundsRect.right)
return;
maskbit = revBitMask(v1.x & 7);
- v1.destptr += v1.scaleXstep * _vm->_bitDepth;
+ v1.destptr += v1.scaleXstep * _vm->_bytesPerPixel;
skip_column = false;
} else
skip_column = true;
@@ -996,7 +996,7 @@
if (_draw_bottom < rect.bottom)
_draw_bottom = rect.bottom;
- v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x * _vm->_bitDepth;
+ v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x * _vm->_bytesPerPixel;
codec1_genericDecode(v1);
@@ -1190,7 +1190,7 @@
}
byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) {
- assert(_vm->_bitDepth == 1);
+ assert(_vm->_bytesPerPixel == 1);
Common::Rect clip;
int32 minx, miny, maxw, maxh;
@@ -1294,7 +1294,7 @@
int32 numskip_before = skip_x + (skip_y * _width);
int32 numskip_after = _width - cur_x;
- byte *dst = (byte *)_out.pixels + height_unk * _out.pitch + width_unk * _vm->_bitDepth;
+ byte *dst = (byte *)_out.pixels + height_unk * _out.pitch + width_unk * _vm->_bytesPerPixel;
akos16Decompress(dst, _out.pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, clip.left, clip.top, _zbuf);
return 0;
@@ -1364,14 +1364,14 @@
palPtr = _vm->_hePalettes + _vm->_hePaletteSlot + 768;
}
- byte *dstPtr = (byte *)_out.pixels + dst.top * _out.pitch + dst.left * _vm->_bitDepth;
+ byte *dstPtr = (byte *)_out.pixels + dst.top * _out.pitch + dst.left * _vm->_bytesPerPixel;
if (_shadow_mode == 3) {
- Wiz::decompressWizImage<kWizXMap>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, xmap, _vm->_bitDepth);
+ Wiz::decompressWizImage<kWizXMap>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, xmap, _vm->_bytesPerPixel);
} else {
if (palPtr != NULL) {
- Wiz::decompressWizImage<kWizRMap>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, NULL, _vm->_bitDepth);
+ Wiz::decompressWizImage<kWizRMap>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, NULL, _vm->_bytesPerPixel);
} else {
- Wiz::decompressWizImage<kWizCopy>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, NULL, NULL, _vm->_bitDepth);
+ Wiz::decompressWizImage<kWizCopy>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, NULL, NULL, _vm->_bytesPerPixel);
}
}
#endif
Modified: scummvm/trunk/engines/scumm/base-costume.cpp
===================================================================
--- scummvm/trunk/engines/scumm/base-costume.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/base-costume.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -40,7 +40,7 @@
_out.pixels = vs.getPixels(0, 0);
_actorX += _vm->_virtscr[kMainVirtScreen].xstart & 7;
- _out.w = _out.pitch / _vm->_bitDepth;
+ _out.w = _out.pitch / _vm->_bytesPerPixel;
_out.pixels = (byte *)_out.pixels - (_vm->_virtscr[kMainVirtScreen].xstart & 7);
_numStrips = numStrips;
Modified: scummvm/trunk/engines/scumm/charset.cpp
===================================================================
--- scummvm/trunk/engines/scumm/charset.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/charset.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -284,7 +284,7 @@
}
CharsetRendererCommon::CharsetRendererCommon(ScummEngine *vm)
- : CharsetRenderer(vm), _bitDepth(0), _fontHeight(0), _numChars(0) {
+ : CharsetRenderer(vm), _bytesPerPixel(0), _fontHeight(0), _numChars(0) {
_shadowMode = kNoShadowMode;
_shadowColor = 0;
}
@@ -306,7 +306,7 @@
else
_fontPtr += 29;
- _bitDepth = _fontPtr[0];
+ _bytesPerPixel = _fontPtr[0];
_fontHeight = _fontPtr[1];
_numChars = READ_LE_UINT16(_fontPtr + 2);
}
@@ -323,7 +323,7 @@
if (_fontPtr == 0)
error("CharsetRendererCommon::setCurID: charset %d not found", id);
- _bitDepth = 1;
+ _bytesPerPixel = 1;
_numChars = _fontPtr[4];
_fontHeight = _fontPtr[5];
@@ -802,7 +802,7 @@
byte *back = NULL;
int drawTop = _top - vs->topline;
- if ((_vm->_game.heversion >= 71 && _bitDepth >= 8) || (_vm->_game.heversion >= 90 && _bitDepth == 0)) {
+ if ((_vm->_game.heversion >= 71 && _bytesPerPixel >= 8) || (_vm->_game.heversion >= 90 && _bytesPerPixel == 0)) {
#ifdef ENABLE_HE
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
dstPtr = vs->getPixels(0, 0);
@@ -815,13 +815,13 @@
}
Common::Rect rScreen(vs->w, vs->h);
- if (_bitDepth >= 8) {
+ if (_bytesPerPixel >= 8) {
byte imagePalette[256];
memset(imagePalette, 0, sizeof(imagePalette));
memcpy(imagePalette, _vm->_charsetColorMap, 4);
- Wiz::copyWizImage(dstPtr, charPtr, vs->pitch, kDstScreen, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, imagePalette, NULL, _vm->_bitDepth);
+ Wiz::copyWizImage(dstPtr, charPtr, vs->pitch, kDstScreen, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, imagePalette, NULL, _vm->_bytesPerPixel);
} else {
- Wiz::copyWizImage(dstPtr, charPtr, vs->pitch, kDstScreen, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, NULL, NULL, _vm->_bitDepth);
+ Wiz::copyWizImage(dstPtr, charPtr, vs->pitch, kDstScreen, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, NULL, NULL, _vm->_bytesPerPixel);
}
if (_blitAlso && vs->hasTwoBuffers) {
Modified: scummvm/trunk/engines/scumm/charset.h
===================================================================
--- scummvm/trunk/engines/scumm/charset.h 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/charset.h 2009-09-25 09:13:33 UTC (rev 44336)
@@ -95,7 +95,7 @@
class CharsetRendererCommon : public CharsetRenderer {
protected:
const byte *_fontPtr;
- int _bitDepth;
+ int _bytesPerPixel;
int _fontHeight;
int _numChars;
Modified: scummvm/trunk/engines/scumm/cursor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/cursor.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/cursor.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -147,7 +147,7 @@
uint size;
byte *dst;
- size = width * height * _bitDepth;
+ size = width * height * _bytesPerPixel;
if (size > sizeof(_grabbedCursor))
error("grabCursor: grabbed cursor too big");
@@ -157,8 +157,8 @@
dst = _grabbedCursor;
for (; height; height--) {
- memcpy(dst, ptr, width * _bitDepth);
- dst += width * _bitDepth;
+ memcpy(dst, ptr, width * _bytesPerPixel);
+ dst += width * _bytesPerPixel;
ptr += pitch;
}
@@ -176,7 +176,7 @@
0xff, 0xff, 0xff, 0,
0, 0, 0, 0};
- if (_bitDepth == 2) {
+ if (_bytesPerPixel == 2) {
for (i = 0; i < 1024; i++)
WRITE_UINT16(_grabbedCursor + i * 2, 5);
} else {
@@ -194,13 +194,13 @@
for (j = 0; j < 32; j++) {
switch ((p & (0x3 << 14)) >> 14) {
case 1:
- if (_bitDepth == 2)
+ if (_bytesPerPixel == 2)
WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[4], palette[5], palette[6]));
else
_grabbedCursor[32 * i + j] = 0xfe;
break;
case 2:
- if (_bitDepth == 2)
+ if (_bytesPerPixel == 2)
WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[0], palette[1], palette[2]));
else
_grabbedCursor[32 * i + j] = 0xfd;
@@ -215,7 +215,7 @@
}
}
- if (_bitDepth == 1) {
+ if (_bytesPerPixel == 1) {
// Since white color position is not guaranteed
// we setup our own palette if supported by backend
CursorMan.replaceCursorPalette(palette, 0xfd, 3);
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/gfx.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -619,7 +619,7 @@
vsPitch >>= 2;
- if (_bitDepth == 2) {
+ if (_bytesPerPixel == 2) {
// Sprites always seem to be used for subtitles in 16Bit color HE games, and not
// the charset renderer, so charset masking isn't required.
for (int h = height * m; h > 0; --h) {
@@ -1975,12 +1975,12 @@
assert(bmap_ptr);
byte code = *bmap_ptr++;
- int scrX = _vm->_screenStartStrip * 8 * _vm->_bitDepth;
+ int scrX = _vm->_screenStartStrip * 8 * _vm->_bytesPerPixel;
if (code == 8 || code == 9) {
Common::Rect rScreen(0, 0, vs->w, vs->h);
byte *dst = (byte *)_vm->_virtscr[kMainVirtScreen].backBuf + scrX;
- Wiz::copyWizImage(dst, bmap_ptr, vs->pitch, kDstScreen, vs->w, vs->h, x - scrX, y, w, h, &rScreen, 0, 0, 0, _vm->_bitDepth);
+ Wiz::copyWizImage(dst, bmap_ptr, vs->pitch, kDstScreen, vs->w, vs->h, x - scrX, y, w, h, &rScreen, 0, 0, 0, _vm->_bytesPerPixel);
}
Common::Rect rect1(x, y, x + w, y + h);
@@ -2820,11 +2820,11 @@
while (1) {
if (!transpCheck || color != _transparentColor)
writeRoomColor(dst, color);
- dst += _vm->_bitDepth;
+ dst += _vm->_bytesPerPixel;
--x;
if (x == 0) {
x = width;
- dst += dstPitch - width * _vm->_bitDepth;
+ dst += dstPitch - width * _vm->_bytesPerPixel;
--height;
if (height == 0)
return;
@@ -2909,7 +2909,7 @@
FILL_BITS;
if (!transpCheck || color != _transparentColor)
writeRoomColor(dst, color);
- dst += _vm->_bitDepth;
+ dst += _vm->_bytesPerPixel;
againPos:
if (!READ_BIT) {
@@ -2930,13 +2930,13 @@
do {
if (!--x) {
x = 8;
- dst += dstPitch - 8 * _vm->_bitDepth;
+ dst += dstPitch - 8 * _vm->_bytesPerPixel;
if (!--height)
return;
}
if (!transpCheck || color != _transparentColor)
writeRoomColor(dst, color);
- dst += _vm->_bitDepth;
+ dst += _vm->_bytesPerPixel;
} while (--reps);
bits >>= 8;
bits |= (*src++) << (cl - 8);
@@ -2944,7 +2944,7 @@
}
}
} while (--x);
- dst += dstPitch - 8 * _vm->_bitDepth;
+ dst += dstPitch - 8 * _vm->_bytesPerPixel;
} while (--height);
}
@@ -2961,7 +2961,7 @@
FILL_BITS;
if (!transpCheck || color != _transparentColor)
writeRoomColor(dst, color);
- dst += _vm->_bitDepth;
+ dst += _vm->_bytesPerPixel;
if (!READ_BIT) {
} else if (!READ_BIT) {
FILL_BITS;
@@ -2976,7 +2976,7 @@
color += inc;
}
} while (--x);
- dst += dstPitch - 8 * _vm->_bitDepth;
+ dst += dstPitch - 8 * _vm->_bytesPerPixel;
} while (--height);
}
@@ -3061,7 +3061,7 @@
for (x = 0; x < 8; x ++) {
byte color = *src++;
if (!transpCheck || color != _transparentColor)
- writeRoomColor(dst + x * _vm->_bitDepth, color);
+ writeRoomColor(dst + x * _vm->_bytesPerPixel, color);
}
dst += dstPitch;
} while (--height);
Modified: scummvm/trunk/engines/scumm/he/animation_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/animation_he.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/he/animation_he.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -115,7 +115,7 @@
assert(dstPtr);
uint8 *dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0);
assert(dst);
- copyFrameToBuffer(dst, kDstResource, 0, 0, _vm->_screenWidth * _vm->_bitDepth);
+ copyFrameToBuffer(dst, kDstResource, 0, 0, _vm->_screenWidth * _vm->_bytesPerPixel);
} else if (_flags & 1) {
copyFrameToBuffer(pvs->getBackPixels(0, 0), kDstScreen, 0, 0, pvs->pitch);
Modified: scummvm/trunk/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/he/wiz_he.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -1498,10 +1498,10 @@
int32 dstPitch, dstType, cw, ch;
if (flags & kWIFBlitToMemBuffer) {
- dst = (uint8 *)malloc(width * height * _vm->_bitDepth);
+ dst = (uint8 *)malloc(width * height * _vm->_bytesPerPixel);
int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? (_vm->VAR(_vm->VAR_WIZ_TCOLOR)) : 5;
- if (_vm->_bitDepth == 2) {
+ if (_vm->_bytesPerPixel == 2) {
uint8 *tmpPtr = dst;
for (uint i = 0; i < height; i++) {
for (uint j = 0; j < width; j++) {
@@ -1518,7 +1518,7 @@
}
cw = width;
ch = height;
- dstPitch = cw * _vm->_bitDepth;
+ dstPitch = cw * _vm->_bytesPerPixel;
dstType = kDstMemory;
} else {
if (dstResNum) {
@@ -1527,7 +1527,7 @@
dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0);
assert(dst);
getWizImageDim(dstResNum, 0, cw, ch);
- dstPitch = cw * _vm->_bitDepth;
+ dstPitch = cw * _vm->_bytesPerPixel;
dstType = kDstResource;
} else {
VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen];
@@ -1559,7 +1559,7 @@
}
}
- if (flags & kWIFRemapPalette && _vm->_bitDepth == 1) {
+ if (flags & kWIFRemapPalette && _vm->_bytesPerPixel == 1) {
palPtr = rmap + 4;
}
@@ -1571,19 +1571,19 @@
switch (comp) {
case 0:
- copyRawWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor, _vm->_bitDepth);
+ copyRawWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor, _vm->_bytesPerPixel);
break;
case 1:
if (flags & 0x80) {
dst = _vm->getMaskBuffer(0, 0, 1);
- dstPitch /= _vm->_bitDepth;
+ dstPitch /= _vm->_bytesPerPixel;
copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 2);
} else if (flags & 0x100) {
dst = _vm->getMaskBuffer(0, 0, 1);
- dstPitch /= _vm->_bitDepth;
+ dstPitch /= _vm->_bytesPerPixel;
copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 1);
} else {
- copyWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr, _vm->_bitDepth);
+ copyWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr, _vm->_bytesPerPixel);
}
break;
#ifdef USE_RGB_COLOR
@@ -1747,12 +1747,12 @@
dstw = wp->bound.width();
dsth = wp->bound.height();
- dstpitch = dstw * _vm->_bitDepth;
- imageBuffer = (uint8 *)malloc(dstw * dsth * _vm->_bitDepth);
+ dstpitch = dstw * _vm->_bytesPerPixel;
+ imageBuffer = (uint8 *)malloc(dstw * dsth * _vm->_bytesPerPixel);
assert(imageBuffer);
const uint16 transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5;
- if (_vm->_bitDepth == 2) {
+ if (_vm->_bytesPerPixel == 2) {
uint8 *tmpPtr = imageBuffer;
for (i = 0; i < dsth; i++) {
for (j = 0; j < dstw; j++)
@@ -1764,7 +1764,7 @@
}
Common::Rect bound;
- drawWizPolygonImage(imageBuffer, src, NULL, dstpitch, kDstMemory, dstw, dsth, srcw, srch, bound, wp->vert, _vm->_bitDepth);
+ drawWizPolygonImage(imageBuffer, src, NULL, dstpitch, kDstMemory, dstw, dsth, srcw, srch, bound, wp->vert, _vm->_bytesPerPixel);
captureImage(imageBuffer, dstpitch, dstw, dsth, resNum, wp->bound, compType);
free(imageBuffer);
@@ -1812,7 +1812,7 @@
srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, flags, 0, _vm->getHEPaletteSlot(palette));
} else {
- assert(_vm->_bitDepth == 1);
+ assert(_vm->_bytesPerPixel == 1);
uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum);
assert(dataPtr);
srcWizBuf = _vm->findWrappedBlock(MKID_BE('WIZD'), dataPtr, state, 0);
@@ -1843,7 +1843,7 @@
dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0);
assert(dst);
getWizImageDim(dstResNum, 0, dstw, dsth);
- dstpitch = dstw * _vm->_bitDepth;
+ dstpitch = dstw * _vm->_bytesPerPixel;
dstType = kDstResource;
} else {
if (flags & kWIFMarkBufferDirty) {
@@ -1859,7 +1859,7 @@
Common::Rect bound;
getWizImageDim(resNum, state, wizW, wizH);
- drawWizPolygonImage(dst, srcWizBuf, 0, dstpitch, dstType, dstw, dsth, wizW, wizH, bound, wp, _vm->_bitDepth);
+ drawWizPolygonImage(dst, srcWizBuf, 0, dstpitch, dstType, dstw, dsth, wizW, wizH, bound, wp, _vm->_bytesPerPixel);
if (flags & kWIFMarkBufferDirty) {
_vm->markRectAsDirty(kMainVirtScreen, bound);
@@ -1942,7 +1942,7 @@
int16 width = ppa->xmax - ppa->xmin + 1;
pra->x_step = ((ppa->x2 - ppa->x1) << 16) / width;
pra->y_step = ((ppa->y2 - ppa->y1) << 16) / width;
- pra->dst_offs = yoff + x1 * _vm->_bitDepth;
+ pra->dst_offs = yoff + x1 * _vm->_bytesPerPixel;
pra->w = w;
pra->x_s = ppa->x1 << 16;
pra->y_s = ppa->y1 << 16;
@@ -2024,7 +2024,7 @@
int32 cw, ch;
getWizImageDim(resId, 0, cw, ch);
_vm->setCursorHotspot(x, y);
- _vm->setCursorFromBuffer(cursor, cw, ch, cw * _vm->_bitDepth);
+ _vm->setCursorFromBuffer(cursor, cw, ch, cw * _vm->_bytesPerPixel);
// Since we set up cursor palette for default cursor, disable it now
CursorMan.disableCursorPalette(true);
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2009-09-25 09:13:33 UTC (rev 44336)
@@ -254,7 +254,7 @@
_switchRoomEffect2 = 0;
_switchRoomEffect = 0;
- _bitDepth = 0;
+ _bytesPerPixel = 1;
_doEffect = false;
_snapScroll = false;
_currentLights = 0;
@@ -528,11 +528,11 @@
_screenHeight = 200;
}
- _bitDepth = (_game.features & GF_16BIT_COLOR) ? 2 : 1;
+ _bytesPerPixel = (_game.features & GF_16BIT_COLOR) ? 2 : 1;
// Allocate gfx compositing buffer (not needed for V7/V8 games).
if (_game.version < 7)
- _compositeBuf = (byte *)malloc(_screenWidth * _screenHeight * _bitDepth);
+ _compositeBuf = (byte *)malloc(_screenWidth * _screenHeight * _bytesPerPixel);
else
_compositeBuf = 0;
@@ -1225,7 +1225,7 @@
}
free(_compositeBuf);
- _compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier * _bitDepth);
+ _compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier * _bytesPerPixel);
}
#ifdef ENABLE_SCUMM_7_8
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2009-09-25 09:10:59 UTC (rev 44335)
+++ scummvm/trunk/engines/scumm/scumm.h 2009-09-25 09:13:33 UTC (rev 44336)
@@ -963,7 +963,7 @@
int _screenTop;
Common::RenderMode _renderMode;
- uint8 _bitDepth;
+ uint8 _bytesPerPixel;
protected:
ColorCycle _colorCycle[16]; // Palette cycles
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