removed more unused variables; cleaned up some spaces

svn-id: r5442
This commit is contained in:
Max Horn 2002-11-06 15:29:49 +00:00
parent 2c6e69dcaf
commit 63e1069ec1
5 changed files with 39 additions and 46 deletions

View file

@ -854,8 +854,6 @@ void AkosRenderer::codec1_ignorePakCols(int num)
void AkosRenderer::codec5() { void AkosRenderer::codec5() {
int32 clip_left, clip_right, clip_top, clip_bottom, maxw, maxh, tmp_x, tmp_y; int32 clip_left, clip_right, clip_top, clip_bottom, maxw, maxh, tmp_x, tmp_y;
_vm->_bompShadowMode = shadow_mode;
if (!mirror) { if (!mirror) {
clip_left = (_x - move_x_cur - _width) + 1; clip_left = (_x - move_x_cur - _width) + 1;
} else { } else {
@ -907,6 +905,7 @@ void AkosRenderer::codec5() {
bdd.dataptr = srcptr; bdd.dataptr = srcptr;
bdd.scale_x = 255; bdd.scale_x = 255;
bdd.scale_y = 255; bdd.scale_y = 255;
bdd.shadowMode = shadow_mode;
_vm->_bompScallingXPtr = NULL; _vm->_bompScallingXPtr = NULL;
_vm->_bompScallingYPtr = NULL; _vm->_bompScallingYPtr = NULL;
@ -989,16 +988,16 @@ void AkosRenderer::akos16PutOnScreen(byte * dest, byte * src, byte transparency,
} }
} }
#define AKOS16_FILL_BITS() \ #define AKOS16_FILL_BITS() \
if (akos16.numbits <= 8) { \ if (akos16.numbits <= 8) { \
akos16.bits |= (*akos16.dataptr++) << akos16.numbits; \ akos16.bits |= (*akos16.dataptr++) << akos16.numbits; \
akos16.numbits += 8; \ 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) { void AkosRenderer::akos16SkipData(int32 numskip) {
uint16 bits, tmp_bits; uint16 bits, tmp_bits;

View file

@ -3248,11 +3248,11 @@ void Scumm::bompScaleFuncX(byte * line_buffer, byte * scalling_x_ptr, byte skip,
void Scumm::drawBomp(BompDrawData * bd, int decode_mode, int mask) { void Scumm::drawBomp(BompDrawData * bd, int decode_mode, int mask) {
byte skip_y = 128; byte skip_y = 128;
byte skip_y_new = 0; // FIXME - is this a sensible default value? byte skip_y_new = 0;
byte bits = 0; // FIXME - is this a sensible default value? byte bits = 0;
byte *mask_out = 0;
byte tmp; byte tmp;
int32 clip_left, clip_right, clip_top, clip_bottom, tmp_x, tmp_y; 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) { if (bd->x < 0) {
clip_left = -bd->x; clip_left = -bd->x;
@ -3351,7 +3351,7 @@ void Scumm::drawBomp(BompDrawData * bd, int decode_mode, int mask) {
bompApplyActorPalette(line_ptr, clip_right); bompApplyActorPalette(line_ptr, clip_right);
switch(_bompShadowMode) { switch(bd->shadowMode) {
case 0: case 0:
bompApplyShadow0(line_ptr, dst, clip_right); bompApplyShadow0(line_ptr, dst, clip_right);
break; break;
@ -3362,7 +3362,7 @@ void Scumm::drawBomp(BompDrawData * bd, int decode_mode, int mask) {
bompApplyShadow3(line_ptr, dst, clip_right); bompApplyShadow3(line_ptr, dst, clip_right);
break; break;
default: default:
error("Unknown _bompShadowMode %d", _bompShadowMode); error("Unknown bomp shadowMode %d", bd->shadowMode);
} }
labelBompSkip: labelBompSkip:

View file

@ -77,7 +77,7 @@ struct ColorCycle { /* Palette cycles */
}; };
struct BlastObject { /* BlastObjects to draw */ struct BlastObject { /* BlastObjects to draw */
uint16 number, areaX, areaY, areaWidth, areaHeight; uint16 number;
int16 posX, posY; int16 posX, posY;
uint16 width, height; uint16 width, height;
uint16 scaleX, scaleY; uint16 scaleX, scaleY;
@ -106,6 +106,7 @@ struct BompDrawData { /* Bomp graphics data */
byte scale_x, scale_y; byte scale_x, scale_y;
byte *dataptr; byte *dataptr;
int srcwidth, srcheight; int srcwidth, srcheight;
uint16 shadowMode;
}; };
struct Gdi { struct Gdi {

View file

@ -1153,7 +1153,7 @@ void Scumm::nukeFlObjects(int min, int max)
} }
void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth, 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; BlastObject *eo;
ObjectData *od; ObjectData *od;
@ -1165,10 +1165,6 @@ void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int object
eo = &_enqueuedObjects[_enqueuePos++]; eo = &_enqueuedObjects[_enqueuePos++];
eo->number = objectNumber; 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->posX = objectX + (camera._cur.x & 7);
eo->posY = objectY + (camera._cur.y - (_realHeight / 2)); eo->posY = objectY + (camera._cur.y - (_realHeight / 2));
if (objectWidth == 0) { if (objectWidth == 0) {
@ -1184,8 +1180,8 @@ void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int object
eo->height = objectHeight; eo->height = objectHeight;
} }
eo->scaleX = f; eo->scaleX = scaleX;
eo->scaleY = g; eo->scaleY = scaleY;
eo->image = image; eo->image = image;
eo->mode = mode; eo->mode = mode;
@ -1253,20 +1249,18 @@ void Scumm::drawBlastObject(BlastObject *eo)
byte bomp_scalling_x[64], bomp_scalling_y[64]; byte bomp_scalling_x[64], bomp_scalling_y[64];
_bompShadowMode = 0;
if ((bdd.scale_x != 255) || (bdd.scale_y != 255)) { if ((bdd.scale_x != 255) || (bdd.scale_y != 255)) {
_bompScallingXPtr = bomp_scalling_x; _bompScallingXPtr = bomp_scalling_x;
_bompScallingYPtr = bomp_scalling_y; _bompScallingYPtr = bomp_scalling_y;
_bompScaleRight = setupBompScale(_bompScallingXPtr, bdd.srcwidth, bdd.scale_x); _bompScaleRight = setupBompScale(_bompScallingXPtr, bdd.srcwidth, bdd.scale_x);
_bompScaleBottom = setupBompScale(_bompScallingYPtr, bdd.srcheight, bdd.scale_y); _bompScaleBottom = setupBompScale(_bompScallingYPtr, bdd.srcheight, bdd.scale_y);
bdd.shadowMode = 0;
drawBomp(&bdd, 1, 3); drawBomp(&bdd, 1, 3);
} else { } else {
_bompShadowMode = eo->mode; bdd.shadowMode = eo->mode;
drawBomp(&bdd, 1, 0); drawBomp(&bdd, 1, 0);
} }
_bompShadowMode = 0;
_bompScallingXPtr = NULL; _bompScallingXPtr = NULL;
_bompScallingYPtr = NULL; _bompScallingYPtr = NULL;
_bompScaleRight = 0; _bompScaleRight = 0;

View file

@ -851,34 +851,33 @@ public:
// bomp // bomp
void decompressBomp(byte *dst, byte *src, int w, int h); void decompressBomp(byte *dst, byte *src, int w, int h);
void drawBomp(BompDrawData * bd, int decode_mode, int mask); void drawBomp(BompDrawData *bd, int decode_mode, int mask);
int32 setupBompScale(byte * scalling, int32 size, byte scale); int32 setupBompScale(byte *scalling, int32 size, byte scale);
void bompScaleFuncX(byte * line_buffer, byte * scalling_x_ptr, byte skip, int32 size); void bompScaleFuncX(byte *line_buffer, byte *scalling_x_ptr, byte skip, int32 size);
int32 bompDecodeLineMode0(byte * src, byte * line_buffer, int32 size); int32 bompDecodeLineMode0(byte *src, byte *line_buffer, int32 size);
int32 bompDecodeLineMode1(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); int32 bompDecodeLineMode3(byte *src, byte *line_buffer, int32 size);
void bompApplyMask(byte * line_buffer, byte * mask_out, byte bits, int32 size); void bompApplyMask(byte *line_buffer, byte *mask_out, byte bits, int32 size);
void bompApplyShadow0(byte * line_buffer, byte * dst, int32 size); void bompApplyShadow0(byte *line_buffer, byte *dst, int32 size);
void bompApplyShadow1(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 bompApplyShadow3(byte *line_buffer, byte *dst, int32 size);
void bompApplyActorPalette(byte * line_buffer, int32 size); void bompApplyActorPalette(byte *line_buffer, int32 size);
uint16 _bompShadowMode;
int32 _bompScaleRight, _bompScaleBottom; int32 _bompScaleRight, _bompScaleBottom;
byte * _bompScallingXPtr, * _bompScallingYPtr; byte *_bompScallingXPtr, *_bompScallingYPtr;
byte * _bompMaskPtr; byte *_bompMaskPtr;
int32 _bompMaskPitch; int32 _bompMaskPitch;
byte * _bompActorPalletePtr; byte *_bompActorPalletePtr;
uint _shakeFrame; uint _shakeFrame;
int _screenStartStrip, _screenEndStrip; int _screenStartStrip, _screenEndStrip;
int _screenLeft, _screenTop; int _screenLeft, _screenTop;
uint16 _enqueue_b, _enqueue_c, _enqueue_d, _enqueue_e;
int _enqueuePos; int _enqueuePos;
BlastObject _enqueuedObjects[128]; 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 clearEnqueue() { _enqueuePos = 0; }
void drawBlastObjects(); void drawBlastObjects();
void drawBlastObject(BlastObject *eo); void drawBlastObject(BlastObject *eo);
@ -894,7 +893,7 @@ public:
uint32 gfxUsageBits[409]; uint32 gfxUsageBits[409];
byte *_shadowPalette; byte *_shadowPalette;
int _shadowPaletteSize; int _shadowPaletteSize;
byte _currentPalette[0x300]; byte _currentPalette[3 * 256];
byte _proc_special_palette[256]; byte _proc_special_palette[256];
int _palDirtyMin, _palDirtyMax; int _palDirtyMin, _palDirtyMax;