aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/draw-manager.cpp13
-rw-r--r--engines/hdb/draw-manager.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index 2dc49971d1..72ab4419c1 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -330,4 +330,17 @@ void Tile::draw(int x, int y) {
// g_system->copyRectToScreen(_surface.getBasePtr(0, 0), _surface.pitch, x, y, _surface.w, _surface.h);
}
+void Tile::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));
+ if (!clip.isEmpty()) {
+ g_hdb->_drawMan->_globalSurface.copyRectToSurface(_surface.getBasePtr(0, 0), _surface.pitch, x, y, clip.width(), clip.height());
+ }
+ // g_system->copyRectToScreen(_surface.getBasePtr(0, 0), _surface.pitch, x, y, _surface.w, _surface.h);
+}
+
}
diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h
index cb4f8182ba..f5d6f5e808 100644
--- a/engines/hdb/draw-manager.h
+++ b/engines/hdb/draw-manager.h
@@ -121,6 +121,7 @@ public:
Graphics::Surface load(Common::SeekableReadStream *stream);
void draw(int x, int y);
+ void drawMasked(int x, int y);
uint32 _flags;