diff options
author | Johannes Schickel | 2009-05-29 11:58:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-29 11:58:21 +0000 |
commit | 17b761d1e94466e1b7364334ea24a5340669e50f (patch) | |
tree | 5898ef3994900562f763744d953d77ca260d2099 | |
parent | 1b5a9504dcdca819bfe1ba0fee6c46af60ed0801 (diff) | |
download | scummvm-rg350-17b761d1e94466e1b7364334ea24a5340669e50f.tar.gz scummvm-rg350-17b761d1e94466e1b7364334ea24a5340669e50f.tar.bz2 scummvm-rg350-17b761d1e94466e1b7364334ea24a5340669e50f.zip |
Cleanup.
svn-id: r40986
-rw-r--r-- | engines/kyra/screen.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 4e7f391ce9..97ad4b5a83 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1109,7 +1109,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int va_list args; va_start(args, flags); - static int drawShapeVar2[] = { + static const int drawShapeVar2[] = { 1, 3, 2, 5, 4, 3, 2, 1 }; @@ -1413,14 +1413,11 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int uint8 *d = dst; + bool normalPlot = true; while (true) { - bool normalPlot = true; - if (flags & 0x800) - normalPlot = (curY > _maskMinY && curY < _maskMaxY); - - while (!(scaleCounterV & 0xff00)) { + while (!(scaleCounterV & 0xFF00)) { scaleCounterV += _dsScaleH; - if (!(scaleCounterV & 0xff00)) { + if (!(scaleCounterV & 0xFF00)) { _dsTmpWidth = shapeWidth; int cnt = shapeWidth; (this->*_dsScaleSkip)(d, s, cnt); @@ -1437,6 +1434,8 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int if (_dsTmpWidth) { cnt += shpWidthScaled1; if (cnt > 0) { + if (flags & 0x800) + normalPlot = (curY > _maskMinY && curY < _maskMaxY); _dsPlot = normalPlot ? dsPlot2 : dsPlot3; (this->*_dsProcessLine)(d, s, cnt, scaleState); } @@ -1447,10 +1446,12 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int dst += dsPitch; d = dst; ++curY; + if (!--shapeHeight) return; + scaleCounterV -= 0x100; - } while (scaleCounterV & 0xff00); + } while (scaleCounterV & 0xFF00); } va_end(args); |