diff options
author | Willem Jan Palenstijn | 2013-04-18 23:55:01 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:47:44 +0200 |
commit | 102299630901d08a44ef3aec367fcbcae065b9fe (patch) | |
tree | 98db4bbe0c54176c0a43e2f5076f8b3d63b8065c /engines/composer/graphics.cpp | |
parent | 583f9abaf98f64895546b75573e9442ca47426e3 (diff) | |
parent | 78ba3210a57094086d44b25d5a8507c33ce9bef3 (diff) | |
download | scummvm-rg350-102299630901d08a44ef3aec367fcbcae065b9fe.tar.gz scummvm-rg350-102299630901d08a44ef3aec367fcbcae065b9fe.tar.bz2 scummvm-rg350-102299630901d08a44ef3aec367fcbcae065b9fe.zip |
Merge branch 'master'
Diffstat (limited to 'engines/composer/graphics.cpp')
-rw-r--r-- | engines/composer/graphics.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp index 1314e903ae..2b68fac233 100644 --- a/engines/composer/graphics.cpp +++ b/engines/composer/graphics.cpp @@ -507,7 +507,7 @@ const Sprite *ComposerEngine::getSpriteAtPos(const Common::Point &pos) { void ComposerEngine::dirtySprite(const Sprite &sprite) { Common::Rect rect(sprite._pos.x, sprite._pos.y, sprite._pos.x + sprite._surface.w, sprite._pos.y + sprite._surface.h); - rect.clip(_surface.w, _surface.h); + rect.clip(_screen.w, _screen.h); if (rect.isEmpty()) return; @@ -541,8 +541,8 @@ void ComposerEngine::redraw() { for (uint i = 0; i < _dirtyRects.size(); i++) { const Common::Rect &rect = _dirtyRects[i]; - byte *pixels = (byte *)_surface.pixels + (rect.top * _surface.pitch) + rect.left; - _system->copyRectToScreen(pixels, _surface.pitch, rect.left, rect.top, rect.width(), rect.height()); + byte *pixels = (byte *)_screen.pixels + (rect.top * _screen.pitch) + rect.left; + _system->copyRectToScreen(pixels, _screen.pitch, rect.left, rect.top, rect.width(), rect.height()); } _system->updateScreen(); @@ -814,16 +814,16 @@ void ComposerEngine::drawSprite(const Sprite &sprite) { int y = sprite._pos.y; // incoming data is BMP-style (bottom-up), so flip it - byte *pixels = (byte *)_surface.pixels; + byte *pixels = (byte *)_screen.pixels; for (int j = 0; j < sprite._surface.h; j++) { if (j + y < 0) continue; - if (j + y >= _surface.h) + if (j + y >= _screen.h) break; byte *in = (byte *)sprite._surface.pixels + (sprite._surface.h - j - 1) * sprite._surface.w; - byte *out = pixels + ((j + y) * _surface.w) + x; + byte *out = pixels + ((j + y) * _screen.w) + x; for (int i = 0; i < sprite._surface.w; i++) - if ((x + i >= 0) && (x + i < _surface.w) && in[i]) + if ((x + i >= 0) && (x + i < _screen.w) && in[i]) out[i] = in[i]; } } |