From deecb616565e549bfea6d5695461806799b9e622 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 27 Feb 2006 12:23:34 +0000 Subject: Use _numStrips when checking for foreced sprite redraw, instead of set values. svn-id: r20956 --- engines/scumm/he/sprite_he.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp index 7de5f0742a..5d6bda07ac 100644 --- a/engines/scumm/he/sprite_he.cpp +++ b/engines/scumm/he/sprite_he.cpp @@ -1124,11 +1124,11 @@ void Sprite::setRedrawFlags(bool checkZOrder) { if ((!checkZOrder || spi->priority >= 0) && (spi->flags & kSFMarkDirty)) { int lp = spi->bbox.left / 8; lp = MAX(0, lp); - lp = MIN(lp, 79); + lp = MIN(lp, _vm->gdi._numStrips); int rp = (spi->bbox.right + 7) / 8; rp = MAX(0, rp); - rp = MIN(rp, 79); - for (; lp <= rp; ++lp) { + rp = MIN(rp, _vm->gdi._numStrips); + for (; lp < rp; lp++) { if (vs->tdirty[lp] < vs->h && spi->bbox.bottom >= vs->tdirty[lp] && spi->bbox.top <= vs->bdirty[lp]) { spi->flags |= kSFNeedRedraw; break; -- cgit v1.2.3