aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/draw-manager.cpp9
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()) {