diff options
author | Travis Howell | 2005-04-02 15:59:02 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-02 15:59:02 +0000 |
commit | 1f719929e9908fc27dbebb859a0291b24fd20504 (patch) | |
tree | 6f94b75ad9cbab5fbaec9e7467f438ac3eac313f /scumm | |
parent | c734fc5b5c224c0aaf7233f745fc7e08a6f59d57 (diff) | |
download | scummvm-rg350-1f719929e9908fc27dbebb859a0291b24fd20504.tar.gz scummvm-rg350-1f719929e9908fc27dbebb859a0291b24fd20504.tar.bz2 scummvm-rg350-1f719929e9908fc27dbebb859a0291b24fd20504.zip |
Fix sprite redraws
svn-id: r17336
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/sprite_he.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index 47dc9bb1de..a102fad5eb 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -1096,16 +1096,19 @@ void ScummEngine_v90he::spritesBlitToScreen() { } void ScummEngine_v90he::spritesMarkDirty(bool unkFlag) { - VirtScreen *vs0 = &virtscr[kMainVirtScreen]; + VirtScreen *vs = &virtscr[kMainVirtScreen]; for (int i = 0; i < _numSpritesToProcess; ++i) { SpriteInfo *spi = _activeSpritesTable[i]; if (!(spi->flags & (kSFNeedRedraw | kSF30))) { if ((!unkFlag || spi->zorderPriority >= 0) && (spi->flags & kSFMarkDirty)) { bool needRedraw = false; - int lp = MIN(79, spi->bbox.left / 8); - int rp = MIN(79, (spi->bbox.right + 7) / 8); + int lp, rp; + lp = MIN(0, spi->bbox.left / 8); + lp = MAX(79, spi->bbox.left / 8); + rp = MIN(0, (spi->bbox.right + 7) / 8); + rp = MAX(79, (spi->bbox.right + 7) / 8); for (; lp <= rp; ++lp) { - if (vs0->tdirty[lp] < vs0->h && spi->bbox.bottom >= vs0->bdirty[lp] && spi->bbox.top <= vs0->tdirty[lp]) { + if (vs->tdirty[lp] < vs->h && spi->bbox.bottom >= vs->tdirty[lp] && spi->bbox.top <= vs->bdirty[lp]) { needRedraw = true; break; } |