[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.72,1.73 costume.cpp,1.51,1.52 costume.h,1.17,1.18
Max Horn
fingolfin at users.sourceforge.net
Fri May 30 14:39:02 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm bomp.h,2.1,2.2 gfx.cpp,2.130,2.131 gfx.h,1.35,1.36 object.cpp,1.111,1.112 resource.cpp,1.93,1.94 scumm.h,1.227,1.228 scummvm.cpp,2.191,2.192
- Next message: [Scummvm-cvs-logs] CVS: scummvm scumm.dsp,1.40,1.41
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv7340
Modified Files:
akos.cpp costume.cpp costume.h
Log Message:
more costume cleanup. soone we should be able to merger AKOS codec1 and the old costume code
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- akos.cpp 30 May 2003 19:00:30 -0000 1.72
+++ akos.cpp 30 May 2003 21:37:58 -0000 1.73
@@ -388,9 +388,9 @@
maskbit = revBitMask[v1.x & 7];
v1.destptr += v1.scaleXstep;
}
- mask = v1.mask_ptr + (v1.x >> 3);
v1.scaleXindex += v1.scaleXstep;
dst = v1.destptr;
+ mask = v1.mask_ptr + (v1.x >> 3);
}
StartPos:;
} while (--len);
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- costume.cpp 30 May 2003 00:41:58 -0000 1.51
+++ costume.cpp 30 May 2003 21:37:58 -0000 1.52
@@ -67,11 +67,15 @@
int step;
CHECK_HEAP
- v1.mask = 0xF;
- v1.shr = 4;
+
+ v1.scaletable = cost_scaleTable;
+
if (_loaded._numColors == 32) {
v1.mask = 7;
v1.shr = 3;
+ } else {
+ v1.mask = 0xF;
+ v1.shr = 4;
}
switch (_loaded._ptr[7] & 0x7F) {
@@ -158,7 +162,7 @@
if (scal < _scaleY)
y_bottom++;
}
- _scaleIndexY = _scaleIndexYTop = 128 - ymoveCur;
+ _scaleIndexY = 128 - ymoveCur;
} else {
if (!_mirror)
xmoveCur = -xmoveCur;
@@ -175,9 +179,8 @@
y_bottom = y_top + _height;
}
- v1.scaleXstep = -1;
- if (_mirror)
- v1.scaleXstep = 1;
+ v1.skip_width = _width;
+ v1.scaleXstep = _mirror ? 1 : -1;
_vm->updateDirtyRect(0, x_left, x_right + 1, y_top, y_bottom, _dirty_id);
@@ -193,7 +196,7 @@
if (!use_scaling)
skip = -v1.x;
if (skip > 0) {
- _width2 -= skip;
+ v1.skip_width -= skip;
codec1_ignorePakCols(skip);
v1.x = 0;
} else {
@@ -201,14 +204,14 @@
if (skip <= 0) {
drawFlag = 2;
} else {
- _width2 -= skip;
+ v1.skip_width -= skip;
}
}
} else {
if (!use_scaling)
skip = x_right - _vm->_screenWidth;
if (skip > 0) {
- _width2 -= skip;
+ v1.skip_width -= skip;
codec1_ignorePakCols(skip);
v1.x = _vm->_screenWidth - 1;
} else {
@@ -216,11 +219,11 @@
if (skip <= 0)
drawFlag = 2;
else
- _width2 -= skip;
+ v1.skip_width -= skip;
}
}
- if (_width2 == 0)
+ if (v1.skip_width <= 0)
return 0;
if (x_left < 0)
@@ -261,9 +264,9 @@
void CostumeRenderer::proc3() {
const byte *mask, *src;
byte *dst;
- byte maskbit, len, height, pcolor, width;
- int color;
- uint y;
+ byte len, maskbit;
+ uint y, color, height, pcolor;
+ const byte *scaleytab;
bool masked;
y = v1.y;
@@ -272,8 +275,8 @@
len = v1.replen;
color = v1.repcolor;
height = _height;
- width = _width2;
+ scaleytab = &v1.scaletable[_scaleIndexY];
maskbit = revBitMask[v1.x & 7];
mask = v1.mask_ptr + (v1.x >> 3);
@@ -288,7 +291,7 @@
len = *src++;
do {
- if (_scaleY == 255 || cost_scaleTable[_scaleIndexY++] < _scaleY) {
+ if (_scaleY == 255 || *scaleytab++ < _scaleY) {
masked = (y < _outheight) && v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit);
if (color && y < _outheight && !masked) {
@@ -304,18 +307,19 @@
}
*dst = pcolor;
}
- dst += _vm->_screenWidth;
+ dst += _outwidth;
mask += _numStrips;
y++;
}
if (!--height) {
- if (!--width)
+ if (!--v1.skip_width)
return;
height = _height;
y = v1.y;
- _scaleIndexY = _scaleIndexYTop;
- if (_scaleX == 255 || cost_scaleTable[_scaleIndexX] < _scaleX) {
+ scaleytab = &v1.scaletable[_scaleIndexY];
+
+ if (_scaleX == 255 || v1.scaletable[_scaleIndexX] < _scaleX) {
v1.x += v1.scaleXstep;
if (v1.x < 0 || v1.x >= _vm->_screenWidth)
return;
@@ -466,7 +470,7 @@
assert(_srcptr[3] == 0);
costumeInfo = (const CostumeInfo *)_srcptr;
- _width = _width2 = READ_LE_UINT16(&costumeInfo->width);
+ _width = READ_LE_UINT16(&costumeInfo->width);
_height = READ_LE_UINT16(&costumeInfo->height);
xmoveCur = _xmove + (int16)READ_LE_UINT16(&costumeInfo->rel_x);
ymoveCur = _ymove + (int16)READ_LE_UINT16(&costumeInfo->rel_y);
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- costume.h 29 May 2003 18:45:58 -0000 1.17
+++ costume.h 30 May 2003 21:37:58 -0000 1.18
@@ -47,10 +47,8 @@
protected:
LoadedCostume _loaded;
- byte _width2;
-
byte _scaleIndexX; /* must wrap at 256 */
- byte _scaleIndexY, _scaleIndexYTop;
+ byte _scaleIndexY;
byte _palette[32];
public:
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm bomp.h,2.1,2.2 gfx.cpp,2.130,2.131 gfx.h,1.35,1.36 object.cpp,1.111,1.112 resource.cpp,1.93,1.94 scumm.h,1.227,1.228 scummvm.cpp,2.191,2.192
- Next message: [Scummvm-cvs-logs] CVS: scummvm scumm.dsp,1.40,1.41
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list