diff options
author | Nipun Garg | 2019-06-18 00:15:32 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:46 +0200 |
commit | c946e1be1a4ebe8de4078fa3d6955287955adc76 (patch) | |
tree | 335f6cb8782a148aa5c7be7b7232d1b6bbef677f /engines | |
parent | e267210ec863a5e7c870e15eb4e72c71e72645f1 (diff) | |
download | scummvm-rg350-c946e1be1a4ebe8de4078fa3d6955287955adc76.tar.gz scummvm-rg350-c946e1be1a4ebe8de4078fa3d6955287955adc76.tar.bz2 scummvm-rg350-c946e1be1a4ebe8de4078fa3d6955287955adc76.zip |
HDB: Implement workaround for edge blitting
copyRectToSurface expects that graphics won't
touch the edge of the screen. Hence, when they do
touch the edge, the draw call is ignored.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/draw-manager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index e0a4e7c36c..2dc49971d1 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -270,6 +270,9 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) { } void Picture::draw(int x, int y) { + if (x == kScreenWidth || y == kScreenHeight) { + return; + } Common::Rect clip(_surface.getBounds()); clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); if (!clip.isEmpty()) { @@ -279,6 +282,9 @@ void Picture::draw(int x, int y) { } void Picture::drawMasked(int x, int y) { + if (x == kScreenWidth || y == kScreenHeight) { + return; + } _surface.transBlitFrom(_surface, 0xf81f); Common::Rect clip(_surface.getBounds()); clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); @@ -313,6 +319,9 @@ Graphics::Surface Tile::load(Common::SeekableReadStream *stream) { } void Tile::draw(int x, int y) { + if (x == kScreenWidth || y == kScreenHeight) { + return; + } Common::Rect clip(_surface.getBounds()); clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); if (!clip.isEmpty()) { |