diff options
author | Max Horn | 2003-05-12 17:50:09 +0000 |
---|---|---|
committer | Max Horn | 2003-05-12 17:50:09 +0000 |
commit | f4be51cd683961c79145da93227c5c3b2349d587 (patch) | |
tree | c64af8db48d9c30ae33bcde7ca27d23c3a4fab73 /scumm | |
parent | 12f7d71bf28e2a29311ae228de66da59d0c7735b (diff) | |
download | scummvm-rg350-f4be51cd683961c79145da93227c5c3b2349d587.tar.gz scummvm-rg350-f4be51cd683961c79145da93227c5c3b2349d587.tar.bz2 scummvm-rg350-f4be51cd683961c79145da93227c5c3b2349d587.zip |
modified akos / 'old' costume (charset) masking code to a) match each other; also, the costume.cpp code looks again checks _zbuf != 0 even for non-SMALL_HEADER games, as it used to 1 year ago ;-) (note: this change is kinda experimental; might fix some bugs, might introduce some regressions)
svn-id: r7473
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 1 | ||||
-rw-r--r-- | scumm/akos.cpp | 8 | ||||
-rw-r--r-- | scumm/akos.h | 2 | ||||
-rw-r--r-- | scumm/costume.cpp | 11 |
4 files changed, 11 insertions, 11 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 812bb5025e..bc02d86962 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1001,7 +1001,6 @@ void Actor::drawActorCostume() { bottom = cr._draw_bottom; } else { AkosRenderer ar(_vm); - ar.charsetmask = true; ar._actorX = x - _vm->virtscr[0].xstart; ar._actorY = y - elevation; ar._scaleX = scalex; diff --git a/scumm/akos.cpp b/scumm/akos.cpp index aa5ca72d3f..9bca612ce3 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -636,7 +636,7 @@ void AkosRenderer::codec1() { int cur_x, x_right, x_left, skip = 0, tmp_x, tmp_y; int cur_y, y_top, y_bottom; bool y_clipping; - bool masking; + bool charsetmask, masking; int step; /* implement custom scale table */ @@ -835,15 +835,17 @@ void AkosRenderer::codec1() { v1.destptr = outptr + cur_x + cur_y * outwidth; + charsetmask = + _vm->hasCharsetMask(x_left, y_top + _vm->virtscr[0].topline, x_right, + _vm->virtscr[0].topline + y_bottom); masking = false; - if (_zbuf) { + if (_zbuf != 0) { masking = _vm->isMaskActiveAt(x_left, y_top, x_right, y_bottom, _vm->getResourceAddress(rtBuffer, 9) + _vm->gdi._imgBufOffs[_zbuf] + _vm->_screenStartStrip) != 0; } v1.mask_ptr = NULL; - if (masking || charsetmask || _shadow_mode) { v1.mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + cur_y * _numStrips + _vm->_screenStartStrip; v1.imgbufoffs = _vm->gdi._imgBufOffs[_zbuf]; diff --git a/scumm/akos.h b/scumm/akos.h index 4132dfaf5d..6952741f4a 100644 --- a/scumm/akos.h +++ b/scumm/akos.h @@ -31,8 +31,6 @@ struct AkosOffset; class AkosRenderer : public BaseCostumeRenderer { public: - bool charsetmask; // FIXME - it seems charsetmask is only set once, in actor.cpp, to true. So can we get rid of it?!? - byte *outptr; uint outwidth, outheight; diff --git a/scumm/costume.cpp b/scumm/costume.cpp index 70d83a7f03..1e910c8423 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -80,8 +80,8 @@ const byte cost_scaleTable[256] = { byte CostumeRenderer::mainRoutine(int slot, int frame) { int xmove, ymove, i, b, s; uint scal; - byte scaling; - byte charsetmask, masking; + bool scaling; + bool charsetmask, masking; byte startScaleIndexX; byte newAmiCost; int ex1, ex2; @@ -284,17 +284,18 @@ byte CostumeRenderer::mainRoutine(int slot, int frame) { charsetmask = _vm->hasCharsetMask(_left, _top + _vm->virtscr[0].topline, _right, _vm->virtscr[0].topline + _bottom); - masking = 0; - + masking = false; if (_vm->_features & GF_SMALL_HEADER) masking = (_zbuf != 0); - else + else if (_zbuf != 0) { masking = _vm->isMaskActiveAt(_left, _top, _right, _bottom, _vm->getResourceAddress(rtBuffer, 9) + _vm->gdi._imgBufOffs[_zbuf] + _vm->_screenStartStrip); + } + _mask_ptr = NULL; if (masking || charsetmask) { _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + _ypos * _numStrips + _vm->_screenStartStrip; _imgbufoffs = _vm->gdi._imgBufOffs[_zbuf]; |