diff options
author | Martin Kiewitz | 2010-01-07 13:56:56 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-07 13:56:56 +0000 |
commit | 4701d0799c997bb5479275ba0a3ff0ffd4113197 (patch) | |
tree | c232481c5dc87ca9e294fb0dc631d649c8efbbc0 /engines/sci/graphics/view.cpp | |
parent | 12cd066e442eaedb4eacb575ee961657612be338 (diff) | |
download | scummvm-rg350-4701d0799c997bb5479275ba0a3ff0ffd4113197.tar.gz scummvm-rg350-4701d0799c997bb5479275ba0a3ff0ffd4113197.tar.bz2 scummvm-rg350-4701d0799c997bb5479275ba0a3ff0ffd4113197.zip |
SCI: small cleanup in view drawing
svn-id: r47108
Diffstat (limited to 'engines/sci/graphics/view.cpp')
-rw-r--r-- | engines/sci/graphics/view.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index d4e509f774..5c78c2a39c 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -482,26 +482,25 @@ void View::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectT bitmap += (clipRect.top - rect.top) * celWidth + (clipRect.left - rect.left); // TODO: SCI1.1 view scaling - if (!_EGAmapping) { - for (y = clipRectTranslated.top; y < clipRectTranslated.top + height; y++, bitmap += celWidth) { + for (y = 0; y < height; y++, bitmap += celWidth) { for (x = 0; x < width; x++) { color = bitmap[x]; - if (color != clearKey && priority >= _screen->getPriority(clipRectTranslated.left + x, y)) { + if (color != clearKey && priority >= _screen->getPriority(clipRectTranslated.left + x, clipRectTranslated.top + y)) { if (origHeight == -1) // HACK: this parameter is passed for already scaled views, but we're not actually using it - _screen->putPixel(clipRectTranslated.left + x, y, drawMask, palette->mapping[color], priority, 0); + _screen->putPixel(clipRectTranslated.left + x, clipRectTranslated.top + y, drawMask, palette->mapping[color], priority, 0); else - _screen->putPixelOnDisplay(clipRectTranslated.left + x, y, palette->mapping[color]); + _screen->putPixelOnDisplay(clipRectTranslated.left + x, clipRectTranslated.top + y, palette->mapping[color]); } } } } else { byte *EGAmapping = _EGAmapping + (EGAmappingNr * SCI_VIEW_EGAMAPPING_SIZE); - for (y = clipRectTranslated.top; y < clipRectTranslated.top + height; y++, bitmap += celWidth) { + for (y = 0; y < height; y++, bitmap += celWidth) { for (x = 0; x < width; x++) { color = EGAmapping[bitmap[x]]; - if (color != clearKey && priority >= _screen->getPriority(clipRectTranslated.left + x, y)) - _screen->putPixel(clipRectTranslated.left + x, y, drawMask, color, priority, 0); + if (color != clearKey && priority >= _screen->getPriority(clipRectTranslated.left + x, clipRectTranslated.top + y)) + _screen->putPixel(clipRectTranslated.left + x, clipRectTranslated.top + y, drawMask, color, priority, 0); } } } |