[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.25,1.26 gfx.cpp,1.53,1.54 gfx.h,1.6,1.7 object.cpp,1.11,1.12 scumm.h,1.56,1.57
Max Horn
fingolfin at users.sourceforge.net
Wed Nov 6 07:30:11 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv18188
Modified Files:
akos.cpp gfx.cpp gfx.h object.cpp scumm.h
Log Message:
removed more unused variables; cleaned up some spaces
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- akos.cpp 6 Nov 2002 14:54:21 -0000 1.25
+++ akos.cpp 6 Nov 2002 15:29:48 -0000 1.26
@@ -854,8 +854,6 @@
void AkosRenderer::codec5() {
int32 clip_left, clip_right, clip_top, clip_bottom, maxw, maxh, tmp_x, tmp_y;
- _vm->_bompShadowMode = shadow_mode;
-
if (!mirror) {
clip_left = (_x - move_x_cur - _width) + 1;
} else {
@@ -907,6 +905,7 @@
bdd.dataptr = srcptr;
bdd.scale_x = 255;
bdd.scale_y = 255;
+ bdd.shadowMode = shadow_mode;
_vm->_bompScallingXPtr = NULL;
_vm->_bompScallingYPtr = NULL;
@@ -989,16 +988,16 @@
}
}
-#define AKOS16_FILL_BITS() \
- if (akos16.numbits <= 8) { \
- akos16.bits |= (*akos16.dataptr++) << akos16.numbits; \
- akos16.numbits += 8; \
- }
+#define AKOS16_FILL_BITS() \
+ if (akos16.numbits <= 8) { \
+ akos16.bits |= (*akos16.dataptr++) << akos16.numbits; \
+ akos16.numbits += 8; \
+ }
+
+#define AKOS16_EAT_BITS(n) \
+ akos16.numbits -= (n); \
+ akos16.bits >>= (n);
-#define AKOS16_EAT_BITS(n) \
- akos16.numbits -= (n); \
- akos16.bits >>= (n);
-
void AkosRenderer::akos16SkipData(int32 numskip) {
uint16 bits, tmp_bits;
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- gfx.cpp 6 Nov 2002 14:54:21 -0000 1.53
+++ gfx.cpp 6 Nov 2002 15:29:48 -0000 1.54
@@ -3248,11 +3248,11 @@
void Scumm::drawBomp(BompDrawData * bd, int decode_mode, int mask) {
byte skip_y = 128;
- byte skip_y_new = 0; // FIXME - is this a sensible default value?
- byte bits = 0; // FIXME - is this a sensible default value?
+ byte skip_y_new = 0;
+ byte bits = 0;
+ byte *mask_out = 0;
byte tmp;
int32 clip_left, clip_right, clip_top, clip_bottom, tmp_x, tmp_y;
- byte *mask_out = 0; // FIXME - is this a sensible default value?
if (bd->x < 0) {
clip_left = -bd->x;
@@ -3351,7 +3351,7 @@
bompApplyActorPalette(line_ptr, clip_right);
- switch(_bompShadowMode) {
+ switch(bd->shadowMode) {
case 0:
bompApplyShadow0(line_ptr, dst, clip_right);
break;
@@ -3362,7 +3362,7 @@
bompApplyShadow3(line_ptr, dst, clip_right);
break;
default:
- error("Unknown _bompShadowMode %d", _bompShadowMode);
+ error("Unknown bomp shadowMode %d", bd->shadowMode);
}
labelBompSkip:
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gfx.h 24 Oct 2002 06:28:54 -0000 1.6
+++ gfx.h 6 Nov 2002 15:29:49 -0000 1.7
@@ -77,7 +77,7 @@
};
struct BlastObject { /* BlastObjects to draw */
- uint16 number, areaX, areaY, areaWidth, areaHeight;
+ uint16 number;
int16 posX, posY;
uint16 width, height;
uint16 scaleX, scaleY;
@@ -106,6 +106,7 @@
byte scale_x, scale_y;
byte *dataptr;
int srcwidth, srcheight;
+ uint16 shadowMode;
};
struct Gdi {
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- object.cpp 6 Nov 2002 14:54:21 -0000 1.11
+++ object.cpp 6 Nov 2002 15:29:49 -0000 1.12
@@ -1153,7 +1153,7 @@
}
void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth,
- int objectHeight, int f, int g, int image, int mode)
+ int objectHeight, int scaleX, int scaleY, int image, int mode)
{
BlastObject *eo;
ObjectData *od;
@@ -1165,10 +1165,6 @@
eo = &_enqueuedObjects[_enqueuePos++];
eo->number = objectNumber;
- eo->areaX = _enqueue_b;
- eo->areaY = _enqueue_c;
- eo->areaWidth = _enqueue_d;
- eo->areaHeight = _enqueue_e;
eo->posX = objectX + (camera._cur.x & 7);
eo->posY = objectY + (camera._cur.y - (_realHeight / 2));
if (objectWidth == 0) {
@@ -1184,8 +1180,8 @@
eo->height = objectHeight;
}
- eo->scaleX = f;
- eo->scaleY = g;
+ eo->scaleX = scaleX;
+ eo->scaleY = scaleY;
eo->image = image;
eo->mode = mode;
@@ -1253,20 +1249,18 @@
byte bomp_scalling_x[64], bomp_scalling_y[64];
- _bompShadowMode = 0;
-
if ((bdd.scale_x != 255) || (bdd.scale_y != 255)) {
_bompScallingXPtr = bomp_scalling_x;
_bompScallingYPtr = bomp_scalling_y;
_bompScaleRight = setupBompScale(_bompScallingXPtr, bdd.srcwidth, bdd.scale_x);
_bompScaleBottom = setupBompScale(_bompScallingYPtr, bdd.srcheight, bdd.scale_y);
+ bdd.shadowMode = 0;
drawBomp(&bdd, 1, 3);
} else {
- _bompShadowMode = eo->mode;
+ bdd.shadowMode = eo->mode;
drawBomp(&bdd, 1, 0);
}
- _bompShadowMode = 0;
_bompScallingXPtr = NULL;
_bompScallingYPtr = NULL;
_bompScaleRight = 0;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- scumm.h 6 Nov 2002 14:54:21 -0000 1.56
+++ scumm.h 6 Nov 2002 15:29:49 -0000 1.57
@@ -851,34 +851,33 @@
// bomp
void decompressBomp(byte *dst, byte *src, int w, int h);
- void drawBomp(BompDrawData * bd, int decode_mode, int mask);
- int32 setupBompScale(byte * scalling, int32 size, byte scale);
- void bompScaleFuncX(byte * line_buffer, byte * scalling_x_ptr, byte skip, int32 size);
- int32 bompDecodeLineMode0(byte * src, byte * line_buffer, int32 size);
- int32 bompDecodeLineMode1(byte * src, byte * line_buffer, int32 size);
- int32 bompDecodeLineMode3(byte * src, byte * line_buffer, int32 size);
- void bompApplyMask(byte * line_buffer, byte * mask_out, byte bits, int32 size);
- void bompApplyShadow0(byte * line_buffer, byte * dst, int32 size);
- void bompApplyShadow1(byte * line_buffer, byte * dst, int32 size);
- void bompApplyShadow3(byte * line_buffer, byte * dst, int32 size);
- void bompApplyActorPalette(byte * line_buffer, int32 size);
+ void drawBomp(BompDrawData *bd, int decode_mode, int mask);
+ int32 setupBompScale(byte *scalling, int32 size, byte scale);
+ void bompScaleFuncX(byte *line_buffer, byte *scalling_x_ptr, byte skip, int32 size);
+ int32 bompDecodeLineMode0(byte *src, byte *line_buffer, int32 size);
+ int32 bompDecodeLineMode1(byte *src, byte *line_buffer, int32 size);
+ int32 bompDecodeLineMode3(byte *src, byte *line_buffer, int32 size);
+ void bompApplyMask(byte *line_buffer, byte *mask_out, byte bits, int32 size);
+ void bompApplyShadow0(byte *line_buffer, byte *dst, int32 size);
+ void bompApplyShadow1(byte *line_buffer, byte *dst, int32 size);
+ void bompApplyShadow3(byte *line_buffer, byte *dst, int32 size);
+ void bompApplyActorPalette(byte *line_buffer, int32 size);
- uint16 _bompShadowMode;
int32 _bompScaleRight, _bompScaleBottom;
- byte * _bompScallingXPtr, * _bompScallingYPtr;
- byte * _bompMaskPtr;
+ byte *_bompScallingXPtr, *_bompScallingYPtr;
+ byte *_bompMaskPtr;
int32 _bompMaskPitch;
- byte * _bompActorPalletePtr;
+ byte *_bompActorPalletePtr;
uint _shakeFrame;
int _screenStartStrip, _screenEndStrip;
int _screenLeft, _screenTop;
- uint16 _enqueue_b, _enqueue_c, _enqueue_d, _enqueue_e;
int _enqueuePos;
BlastObject _enqueuedObjects[128];
- void enqueueObject(int a, int b, int c, int d, int e, int f, int g, int h, int mode);
+ void enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth,
+ int objectHeight, int scaleX, int scaleY, int image, int mode);
void clearEnqueue() { _enqueuePos = 0; }
void drawBlastObjects();
void drawBlastObject(BlastObject *eo);
@@ -894,7 +893,7 @@
uint32 gfxUsageBits[409];
byte *_shadowPalette;
int _shadowPaletteSize;
- byte _currentPalette[0x300];
+ byte _currentPalette[3 * 256];
byte _proc_special_palette[256];
int _palDirtyMin, _palDirtyMax;
More information about the Scummvm-git-logs
mailing list