[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.114,1.115 akos.cpp,1.58,1.59 akos.h,1.15,1.16 base-costume.h,1.4,1.5 costume.cpp,1.43,1.44 costume.h,1.12,1.13
Max Horn
fingolfin at users.sourceforge.net
Wed May 28 19:15:08 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.57,1.58 costume.cpp,1.42,1.43 costume.h,1.11,1.12
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.59,1.60 akos.h,1.16,1.17 base-costume.h,1.5,1.6 costume.cpp,1.44,1.45 costume.h,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv26068
Modified Files:
actor.cpp akos.cpp akos.h base-costume.h costume.cpp costume.h
Log Message:
they are getting more and more similar :-)
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- actor.cpp 28 May 2003 21:43:34 -0000 1.114
+++ actor.cpp 29 May 2003 02:14:30 -0000 1.115
@@ -906,8 +906,6 @@
if (!(_vm->_features & GF_NEW_COSTUMES)) {
CostumeRenderer& cr = *(CostumeRenderer *)bcr;
- cr._outheight = _vm->virtscr[0].height;
-
if (forceClip)
cr._zbuf = forceClip;
else if (isInClass(kObjectClassNeverClip))
@@ -930,13 +928,13 @@
ar._zbuf = _vm->gdi._numZBuffer;
}
- ar.outptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart;
- ar.outwidth = _vm->virtscr[0].width;
- ar.outheight = _vm->virtscr[0].height;
-
ar._draw_top = top = 0x7fffffff;
ar._draw_bottom = bottom = 0;
}
+
+ bcr->_outptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart;
+ bcr->_outwidth = _vm->virtscr[0].width;
+ bcr->_outheight = _vm->virtscr[0].height;
// If the actor is partially hidden, redraw it next frame.
// Note: for akos, this only works for codec 1 so far; we need to look
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- akos.cpp 29 May 2003 01:27:16 -0000 1.58
+++ akos.cpp 29 May 2003 02:14:31 -0000 1.59
@@ -256,7 +256,7 @@
assert((code & 0xFFF) * 6 < READ_BE_UINT32_UNALIGNED((const byte *)akof - 4) - 8);
assert((code & 0x7000) == 0);
- srcptr = akcd + READ_LE_UINT32(&off->akcd);
+ _srcptr = akcd + READ_LE_UINT32(&off->akcd);
costumeInfo = (const CostumeInfo *) (akci + READ_LE_UINT16(&off->akci));
_width = READ_LE_UINT16(&costumeInfo->width);
@@ -289,7 +289,7 @@
code = ((code & 0xF) << 8) | p[5];
off = akof + code;
- srcptr = akcd + READ_LE_UINT32(&off->akcd);
+ _srcptr = akcd + READ_LE_UINT32(&off->akcd);
costumeInfo = (const CostumeInfo *) (akci + READ_LE_UINT16(&off->akci));
_width = READ_LE_UINT16(&costumeInfo->width);
@@ -327,10 +327,9 @@
const byte *scaleytab, *mask;
y = v1.y;
-
- len = v1.replen;
- src = srcptr;
+ src = _srcptr;
dst = v1.destptr;
+ len = v1.replen;
color = v1.repcolor;
height = _height;
@@ -350,12 +349,12 @@
do {
if (*scaleytab++ < _scaleY) {
- if (color && y < outheight
+ if (color && y < _outheight
&& (!v1.mask_ptr || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))) {
*dst = palette[color];
}
mask += _numStrips;
- dst += outwidth;
+ dst += _outwidth;
y++;
}
if (!--height) {
@@ -391,10 +390,9 @@
const byte *scaleytab, *mask;
y = v1.y;
-
- len = v1.replen;
- src = srcptr;
+ src = _srcptr;
dst = v1.destptr;
+ len = v1.replen;
color = v1.repcolor;
height = _height;
@@ -414,7 +412,7 @@
do {
if (*scaleytab++ < _scaleY) {
- if (color && y < outheight
+ if (color && y < _outheight
&& (!v1.mask_ptr || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))) {
pcolor = palette[color];
if (pcolor == 13)
@@ -422,7 +420,7 @@
*dst = pcolor;
}
mask += _numStrips;
- dst += outwidth;
+ dst += _outwidth;
y++;
}
if (!--height) {
@@ -462,10 +460,9 @@
const byte *scaleytab, *mask;
y = v1.y;
-
- len = v1.replen;
- src = srcptr;
+ src = _srcptr;
dst = v1.destptr;
+ len = v1.replen;
color = v1.repcolor;
height = _height;
@@ -485,7 +482,7 @@
do {
if (*scaleytab++ < _scaleY) {
- if (color && y < outheight
+ if (color && y < _outheight
&& (!v1.mask_ptr || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))) {
pcolor = palette[color];
if (pcolor < 8) {
@@ -496,7 +493,7 @@
}
}
mask += _numStrips;
- dst += outwidth;
+ dst += _outwidth;
y++;
}
if (!--height) {
@@ -632,7 +629,8 @@
int num_colors;
bool use_scaling;
int i, j;
- int cur_x, x_right, x_left, skip = 0, startScaleIndexX, tmp_y;
+ int skip = 0, startScaleIndexX, tmp_y;
+ int cur_x, x_right, x_left;
int cur_y, y_top, y_bottom;
bool y_clipping;
bool charsetmask, masking;
@@ -709,7 +707,7 @@
j = startScaleIndexX;
for (i = 0, skip = 0; i < _width; i++) {
- if (x_left >= (int)outwidth) {
+ if (x_left >= (int)_outwidth) {
startScaleIndexX = j;
skip++;
}
@@ -771,17 +769,15 @@
if (_mirror)
v1.scaleXstep = -v1.scaleXstep;
- if ((int) y_top >= (int)outheight || y_bottom <= 0)
+ if ((int) y_top >= (int)_outheight || y_bottom <= 0)
return 0;
- if ((int)x_left >= (int)outwidth || x_right <= 0)
+ if ((int)x_left >= (int)_outwidth || x_right <= 0)
return 1;
v1.replen = 0;
- v1.y_pitch = _height * outwidth;
if (_mirror) {
- v1.y_pitch--;
if (!use_scaling)
skip = -cur_x;
if (skip > 0) {
@@ -789,7 +785,7 @@
codec1_ignorePakCols(skip);
cur_x = 0;
} else {
- skip = x_right - outwidth;
+ skip = x_right - _outwidth;
if (skip <= 0) {
drawFlag = 2;
} else {
@@ -797,14 +793,12 @@
}
}
} else {
- v1.y_pitch++;
- if (!use_scaling) {
- skip = x_right - outwidth + 1;
- }
+ if (!use_scaling)
+ skip = x_right - _outwidth + 1;
if (skip > 0) {
v1.skip_width -= skip;
codec1_ignorePakCols(skip);
- cur_x = outwidth - 1;
+ cur_x = _outwidth - 1;
} else {
skip = -1 - x_left;
if (skip <= 0) {
@@ -823,13 +817,13 @@
_vm->updateDirtyRect(0, x_left, x_right, y_top, y_bottom, _dirty_id);
- y_clipping = ((uint) y_bottom > outheight || y_top < 0);
+ y_clipping = ((uint) y_bottom > _outheight || y_top < 0);
- if ((uint) y_top > (uint) outheight)
+ if ((uint) y_top > (uint) _outheight)
y_top = 0;
- if ((uint) y_bottom > (uint) outheight)
- y_bottom = outheight;
+ if ((uint) y_bottom > (uint) _outheight)
+ y_bottom = _outheight;
if (_draw_top > y_top)
_draw_top = y_top;
@@ -839,7 +833,7 @@
if (cur_x == -1)
cur_x = 0; /* ?? */
- v1.destptr = outptr + cur_x + cur_y * outwidth;
+ v1.destptr = _outptr + cur_x + cur_y * _outwidth;
charsetmask =
_vm->hasCharsetMask(x_left, y_top + _vm->virtscr[0].topline, x_right,
@@ -886,11 +880,12 @@
n = _height;
if (num > 1)
n *= num;
+
do {
- v1.repcolor = *srcptr++;
+ v1.repcolor = *_srcptr++;
v1.replen = v1.repcolor & v1.mask;
if (v1.replen == 0) {
- v1.replen = *srcptr++;
+ v1.replen = *_srcptr++;
}
do {
if (!--n) {
@@ -913,8 +908,8 @@
clip_right = (clip_left + _width) - 1;
clip_top = _actorY + _ymoveCur;
clip_bottom = (clip_top + _height) - 1;
- maxw = outwidth - 1;
- maxh = outheight - 1;
+ maxw = _outwidth - 1;
+ maxh = _outheight - 1;
if (clip_left < 0) {
clip_left = 0;
@@ -949,10 +944,10 @@
bdd.srcwidth = _width;
bdd.srcheight = _height;
- bdd.out = outptr;
- bdd.outwidth = outwidth;
- bdd.outheight = outheight;
- bdd.dataptr = srcptr;
+ bdd.out = _outptr;
+ bdd.outwidth = _outwidth;
+ bdd.outheight = _outheight;
+ bdd.dataptr = _srcptr;
bdd.scale_x = 255;
bdd.scale_y = 255;
bdd.shadowMode = _shadow_mode;
@@ -1198,8 +1193,8 @@
int32 skip_y = 0;
int32 cur_x = _width - 1;
int32 cur_y = _height - 1;
- int32 maxw = outwidth - 1;
- int32 maxh = outheight - 1;
+ int32 maxw = _outwidth - 1;
+ int32 maxh = _outheight - 1;
int32 tmp_x, tmp_y;
byte transparency = (_vm->_features & GF_HUMONGOUS) ? 0 : 255;
@@ -1282,16 +1277,16 @@
int32 numskip_before = skip_x + (skip_y * _width);
int32 numskip_after = _width - cur_x;
- byte *dest = outptr + width_unk + height_unk * _vm->_screenWidth;
+ byte *dest = _outptr + width_unk + height_unk * _outwidth;
if (_zbuf == 0) {
- akos16Decompress(dest, pitch, srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency);
+ akos16Decompress(dest, pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency);
return 0;
}
byte *ptr = _vm->_screenStartStrip + _vm->getResourceAddress(rtBuffer, 9) + _vm->gdi._imgBufOffs[_zbuf];
ptr += _numStrips * clip_top + (clip_left / 8);
- akos16DecompressMask(dest, pitch, srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, ptr, clip_left / 8);
+ akos16DecompressMask(dest, pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, ptr, clip_left / 8);
return 0;
}
Index: akos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- akos.h 28 May 2003 21:08:56 -0000 1.15
+++ akos.h 29 May 2003 02:14:31 -0000 1.16
@@ -30,13 +30,9 @@
struct AkosOffset;
class AkosRenderer : public BaseCostumeRenderer {
-public:
- byte *outptr;
- uint outwidth, outheight;
-
protected:
uint16 codec;
- const byte *srcptr;
+ const byte *_srcptr;
// movement of cel to decode
int _xmoveCur, _ymoveCur;
@@ -53,23 +49,6 @@
const byte *akcd;
struct {
- /* codec stuff */
- const byte *scaletable;
- byte mask, shr;
- bool doContinue;
- byte repcolor;
- byte replen;
- int scaleXstep;
- int x, y;
- int tmp_x, tmp_y;
- int y_pitch;
- int skip_width;
- byte *destptr;
- byte *mask_ptr;
- int imgbufoffs;
- } v1;
-
- struct {
byte unk5;
int unk6;
byte mask;
@@ -83,8 +62,7 @@
public:
AkosRenderer(Scumm *scumm) : BaseCostumeRenderer(scumm) {
- outptr = 0;
- srcptr = 0;
+ _srcptr = 0;
akos = 0;
akhd = 0;
akpl = 0;
Index: base-costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- base-costume.h 28 May 2003 21:08:56 -0000 1.4
+++ base-costume.h 29 May 2003 02:14:31 -0000 1.5
@@ -57,6 +57,10 @@
int _draw_top, _draw_bottom;
+ // Destination params
+ byte *_outptr;
+ uint _outwidth, _outheight;
+
protected:
Scumm *_vm;
int32 _numStrips;
@@ -70,6 +74,21 @@
// width and height of cel to decode
int _width, _height;
+ struct {
+ /* codec stuff */
+ const byte *scaletable;
+ byte mask, shr;
+ byte repcolor;
+ byte replen;
+ int scaleXstep;
+ int x, y;
+ int tmp_x, tmp_y;
+ int skip_width;
+ byte *destptr;
+ const byte *mask_ptr;
+ int imgbufoffs;
+ } v1;
+
public:
BaseCostumeRenderer(Scumm *scumm) {
_dirty_id = 0;
@@ -85,6 +104,9 @@
_xmove = _ymove = 0;
_mirror = false;
_width = _height = 0;
+
+ _outptr = 0;
+ _outwidth = _outheight = 0;
}
virtual void setPalette(byte *palette) = 0;
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- costume.cpp 29 May 2003 01:27:16 -0000 1.43
+++ costume.cpp 29 May 2003 02:14:31 -0000 1.44
@@ -36,17 +36,17 @@
n *= num;
do {
- _repcolor = *_srcptr++;
- _replen = _repcolor & _maskval;
- if (_replen == 0) {
- _replen = *_srcptr++;
+ v1.repcolor = *_srcptr++;
+ v1.replen = v1.repcolor & v1.mask;
+ if (v1.replen == 0) {
+ v1.replen = *_srcptr++;
}
do {
if (!--n) {
- _repcolor >>= _shrval;
+ v1.repcolor >>= v1.shr;
return;
}
- } while (--_replen);
+ } while (--v1.replen);
} while (1);
}
@@ -84,14 +84,16 @@
bool use_scaling;
byte startScaleIndexX;
int ex1, ex2;
+ int y_top, y_bottom;
+ int x_left, x_right;
const CostumeInfo *costumeInfo;
CHECK_HEAP
- _maskval = 0xF;
- _shrval = 4;
+ v1.mask = 0xF;
+ v1.shr = 4;
if (_loaded._numColors == 32) {
- _maskval = 7;
- _shrval = 3;
+ v1.mask = 7;
+ v1.shr = 3;
}
// FIXME: those are here just in case... you never now...
@@ -100,7 +102,7 @@
costumeInfo = (const CostumeInfo *)_srcptr;
_width = _width2 = READ_LE_UINT16(&costumeInfo->width);
- _height = _height2 = READ_LE_UINT16(&costumeInfo->height);
+ _height = READ_LE_UINT16(&costumeInfo->height);
xmove = _xmove + (int16)READ_LE_UINT16(&costumeInfo->rel_x);
ymove = _ymove + (int16)READ_LE_UINT16(&costumeInfo->rel_y);
_xmove += (int16)READ_LE_UINT16(&costumeInfo->move_x);
@@ -119,8 +121,8 @@
}
}
- _xpos = _actorX;
- _ypos = _actorY;
+ v1.x = _actorX;
+ v1.y = _actorY;
use_scaling = (_scaleX != 0xFF) || (_scaleY != 0xFF);
@@ -137,36 +139,36 @@
startScaleIndexX = _scaleIndexX = 128 - xmove;
for (i = 0; i < xmove; i++) {
if (cost_scaleTable[_scaleIndexX++] < _scaleX)
- _xpos -= _scaleIndexXStep;
+ v1.x -= _scaleIndexXStep;
}
- _right = _left = _xpos;
+ x_right = x_left = v1.x;
_scaleIndexX = startScaleIndexX;
for (i = 0; i < _width; i++) {
- if (_right < 0) {
+ if (x_right < 0) {
s++;
startScaleIndexX = _scaleIndexX;
}
scal = cost_scaleTable[_scaleIndexX++];
if (scal < _scaleX)
- _right++;
+ x_right++;
}
} else {
startScaleIndexX = _scaleIndexX = xmove + 128;
for (i = 0; i < xmove; i++) {
scal = cost_scaleTable[_scaleIndexX--];
if (scal < _scaleX)
- _xpos += _scaleIndexXStep;
+ v1.x += _scaleIndexXStep;
}
- _right = _left = _xpos;
+ x_right = x_left = v1.x;
_scaleIndexX = startScaleIndexX;
for (i = 0; i < _width; i++) {
- if (_left > (_vm->_screenWidth - 1)) {
+ if (x_left > (_vm->_screenWidth - 1)) {
s++;
startScaleIndexX = _scaleIndexX;
}
scal = cost_scaleTable[_scaleIndexX--];
if (scal < _scaleX)
- _left--;
+ x_left--;
}
}
_scaleIndexX = startScaleIndexX;
@@ -181,58 +183,56 @@
for (i = 0; i < ymove; i++) {
scal = cost_scaleTable[_scaleIndexY++];
if (scal < _scaleY)
- _ypos -= _scaleIndexYStep;
+ v1.y -= _scaleIndexYStep;
}
- _top = _bottom = _ypos;
+ y_top = y_bottom = v1.y;
_scaleIndexY = 128 - ymove;
for (i = 0; i < _height; i++) {
scal = cost_scaleTable[_scaleIndexY++];
if (scal < _scaleY)
- _bottom++;
+ y_bottom++;
}
_scaleIndexY = _scaleIndexYTop = 128 - ymove;
} else {
- if (_mirror == 0)
+ if (!_mirror)
xmove = -xmove;
- _xpos += xmove;
- _ypos += ymove;
+ v1.x += xmove;
+ v1.y += ymove;
if (_mirror) {
- _left = _xpos;
- _right = _xpos + _width;
+ x_left = v1.x;
+ x_right = v1.x + _width;
} else {
- _left = _xpos - _width;
- _right = _xpos;
+ x_left = v1.x - _width;
+ x_right = v1.x;
}
- _top = _ypos;
- _bottom = _top + _height;
+ y_top = v1.y;
+ y_bottom = y_top + _height;
}
_scaleIndexXStep = -1;
if (_mirror)
_scaleIndexXStep = 1;
- _ypostop = _ypos;
+ _ypostop = v1.y;
- _vm->updateDirtyRect(0, _left, _right + 1, _top, _bottom, _dirty_id);
+ _vm->updateDirtyRect(0, x_left, x_right + 1, y_top, y_bottom, _dirty_id);
- if (_top >= (int)_outheight || _bottom <= 0)
+ if (y_top >= (int)_outheight || y_bottom <= 0)
return 0;
- _ypitch = _height * _vm->_screenWidth;
_docontinue = 0;
- if (_left >= _vm->_screenWidth || _right <= 0)
+ if (x_left >= _vm->_screenWidth || x_right <= 0)
return 1;
if (_mirror) {
- _ypitch--;
- if (use_scaling == 0)
- s = -_xpos;
+ if (!use_scaling)
+ s = -v1.x;
if (s > 0) {
_width2 -= s;
ignorePakCols(s);
- _xpos = 0;
+ v1.x = 0;
_docontinue = 1;
} else {
- s = _right - _vm->_screenWidth;
+ s = x_right - _vm->_screenWidth;
if (s <= 0) {
drawFlag = 2;
} else {
@@ -240,16 +240,15 @@
}
}
} else {
- _ypitch++;
- if (use_scaling == 0)
- s = _right - _vm->_screenWidth;
+ if (!use_scaling)
+ s = x_right - _vm->_screenWidth;
if (s > 0) {
_width2 -= s;
ignorePakCols(s);
- _xpos = _vm->_screenWidth - 1;
+ v1.x = _vm->_screenWidth - 1;
_docontinue = 1;
} else {
- s = -1 - _left;
+ s = -1 - x_left;
if (s <= 0)
drawFlag = 2;
else
@@ -260,32 +259,29 @@
if (_width2 == 0)
return 0;
- if ((uint) _top > (uint) _outheight)
- _top = 0;
-
- if (_left < 0)
- _left = 0;
+ if ((uint) y_top > (uint) _outheight)
+ y_top = 0;
- if ((uint) _bottom > _outheight)
- _bottom = _outheight;
+ if (x_left < 0)
+ x_left = 0;
- if (_draw_top > _top)
- _draw_top = _top;
+ if ((uint) y_bottom > _outheight)
+ y_bottom = _outheight;
- if (_draw_bottom < _bottom)
- _draw_bottom = _bottom;
+ if (_draw_top > y_top)
+ _draw_top = y_top;
+ if (_draw_bottom < y_bottom)
+ _draw_bottom = y_bottom;
- if (_height2 + _top >= 256) {
+ if (_height + y_top >= 256) {
CHECK_HEAP
return 2;
}
- _bgbak_ptr = _vm->getResourceAddress(rtBuffer, 5) + _vm->virtscr[0].xstart + _ypos * _vm->_screenWidth + _xpos;
- _backbuff_ptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart + _ypos * _vm->_screenWidth + _xpos;
+ v1.destptr = _outptr + v1.y * _vm->_screenWidth + v1.x;
- _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + _ypos * _numStrips + _vm->_screenStartStrip;
- _imgbufoffs = _vm->gdi._imgBufOffs[_zbuf];
- _mask_ptr_dest = _mask_ptr + _xpos / 8;
+ v1.mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + v1.y * _numStrips + _vm->_screenStartStrip;
+ v1.imgbufoffs = _vm->gdi._imgBufOffs[_zbuf];
// FIXME: Masking used to be conditional. Will it cause regressions
// to always do it? I don't think so, since the behaviour used to be
@@ -311,20 +307,21 @@
}
void CostumeRenderer::proc3() {
- byte *mask, *src, *dst;
+ const byte *mask, *src;
+ byte *dst;
byte maskbit, len, height, pcolor, width;
int color, t;
uint y;
bool masked;
- mask = _mask_ptr_dest;
- maskbit = revBitMask[_xpos & 7];
- y = _ypos;
+ mask = v1.mask_ptr + (v1.x >> 3);
+ maskbit = revBitMask[v1.x & 7];
+ y = v1.y;
src = _srcptr;
- dst = _backbuff_ptr;
- len = _replen;
- color = _repcolor;
- height = _height2;
+ dst = v1.destptr;
+ len = v1.repcolor;
+ color = v1.repcolor;
+ height = _height;
width = _width2;
if (_docontinue)
@@ -332,14 +329,14 @@
do {
len = *src++;
- color = len >> _shrval;
- len &= _maskval;
+ color = len >> v1.shr;
+ len &= v1.mask;
if (!len)
len = *src++;
do {
if (_scaleY == 255 || cost_scaleTable[_scaleIndexY++] < _scaleY) {
- masked = (_use_mask && (mask[_imgbufoffs] & maskbit)) || (_use_charset_mask && (mask[0] & maskbit));
+ masked = (_use_mask && (mask[v1.imgbufoffs] & maskbit)) || (_use_charset_mask && (mask[0] & maskbit));
if (color && y < _outheight && !masked) {
// FIXME: Fully implement _shadow_mode.
@@ -367,14 +364,14 @@
t = _scaleIndexX;
_scaleIndexX += _scaleIndexXStep;
if (_scaleX == 255 || cost_scaleTable[t] < _scaleX) {
- _xpos += _scaleIndexXStep;
- if (_xpos < 0 || _xpos >= _vm->_screenWidth)
+ v1.x += _scaleIndexXStep;
+ if (v1.x < 0 || v1.x >= _vm->_screenWidth)
return;
- maskbit = revBitMask[_xpos & 7];
- _backbuff_ptr += _scaleIndexXStep;
+ maskbit = revBitMask[v1.x & 7];
+ v1.destptr += _scaleIndexXStep;
}
- dst = _backbuff_ptr;
- mask = _mask_ptr + (_xpos >> 3);
+ dst = v1.destptr;
+ mask = v1.mask_ptr + (v1.x >> 3);
}
StartPos:;
} while (--len);
@@ -382,45 +379,46 @@
}
void CostumeRenderer::proc3_ami() {
- byte *mask, *src, *dst;
+ const byte *mask, *src;
+ byte *dst;
byte maskbit, len, height, width;
int color, t;
uint y;
bool masked;
int oldXpos, oldScaleIndexX;
- mask = _mask_ptr_dest;
- dst = _backbuff_ptr;
- height = _height2;
+ mask = v1.mask_ptr + (v1.x >> 3);
+ dst = v1.destptr;
+ height = _height;
width = _width;
src = _srcptr;
- maskbit = revBitMask[_xpos & 7];
- y = _ypos;
- oldXpos = _xpos;
+ maskbit = revBitMask[v1.x & 7];
+ y = v1.y;
+ oldXpos = v1.x;
oldScaleIndexX = _scaleIndexX;
do {
len = *src++;
- color = len >> _shrval;
- len &= _maskval;
+ color = len >> v1.shr;
+ len &= v1.mask;
if (!len)
len = *src++;
do {
if (_scaleY == 255 || cost_scaleTable[_scaleIndexY] < _scaleY) {
- masked = (_use_mask && (mask[_imgbufoffs] & maskbit)) || (_use_charset_mask && (mask[0] & maskbit));
+ masked = (_use_mask && (mask[v1.imgbufoffs] & maskbit)) || (_use_charset_mask && (mask[0] & maskbit));
- if (color && _xpos >= 0 && _xpos < _vm->_screenWidth && !masked) {
+ if (color && v1.x >= 0 && v1.x < _vm->_screenWidth && !masked) {
*dst = _palette[color];
}
t = _scaleIndexX;
_scaleIndexX = t + _scaleIndexXStep;
if (_scaleX == 255 || cost_scaleTable[t] < _scaleX) {
- _xpos += _scaleIndexXStep;
+ v1.x += _scaleIndexXStep;
dst += _scaleIndexXStep;
- maskbit = revBitMask[_xpos & 7];
+ maskbit = revBitMask[v1.x & 7];
}
- mask = _mask_ptr + (_xpos >> 3);
+ mask = v1.mask_ptr + (v1.x >> 3);
}
if (!--width) {
if (!--height)
@@ -429,14 +427,14 @@
if (y >= _outheight)
return;
- if (_xpos != oldXpos) {
- dst += _vm->_screenWidth - (_xpos - oldXpos);
- _mask_ptr += _numStrips;
- mask = _mask_ptr;
+ if (v1.x != oldXpos) {
+ dst += _vm->_screenWidth - (v1.x - oldXpos);
+ v1.mask_ptr += _numStrips;
+ mask = v1.mask_ptr;
y++;
}
width = _width;
- _xpos = oldXpos;
+ v1.x = oldXpos;
_scaleIndexX = oldScaleIndexX;
_scaleIndexY++;
}
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- costume.h 29 May 2003 01:27:16 -0000 1.12
+++ costume.h 29 May 2003 02:14:31 -0000 1.13
@@ -42,35 +42,22 @@
byte increaseAnim(Actor *a, int slot);
};
-class CostumeRenderer : public BaseCostumeRenderer {
-public:
- uint _outheight;
+class CostumeRenderer : public BaseCostumeRenderer {
protected:
LoadedCostume _loaded;
byte *_frameptr;
- byte *_srcptr;
- byte *_bgbak_ptr, *_backbuff_ptr, *_mask_ptr, *_mask_ptr_dest;
- byte _maskval;
+ const byte *_srcptr;
bool _use_mask, _use_charset_mask;
- byte _shrval;
byte _width2;
- byte _height2;
- int _xpos, _ypos;
int _scaleIndexXStep;
int _scaleIndexYStep;
byte _scaleIndexX; /* must wrap at 256 */
byte _scaleIndexY, _scaleIndexYTop;
- int _left, _right;
- int _top, _bottom;
int _ypostop;
- int _ypitch;
byte _docontinue;
- int _imgbufoffs;
- byte _repcolor;
- byte _replen;
byte _palette[32];
public:
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.57,1.58 costume.cpp,1.42,1.43 costume.h,1.11,1.12
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.59,1.60 akos.h,1.16,1.17 base-costume.h,1.5,1.6 costume.cpp,1.44,1.45 costume.h,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list