aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/direct_draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/direct_draw.cpp')
-rw-r--r--engines/titanic/direct_draw.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/titanic/direct_draw.cpp b/engines/titanic/direct_draw.cpp
index 71f0d35630..17e13610e0 100644
--- a/engines/titanic/direct_draw.cpp
+++ b/engines/titanic/direct_draw.cpp
@@ -108,4 +108,22 @@ DirectDrawSurface *DirectDrawManager::createSurface(int w, int h, int surfaceNum
return _directDraw.createSurfaceFromDesc(DDSurfaceDesc(w, h));
}
+/*------------------------------------------------------------------------*/
+
+void DirectDrawSurface::fill(const Common::Rect *bounds, uint32 color) {
+ Common::Rect tempBounds;
+
+ if (bounds) {
+ // Bounds are provided, clip them to the bounds of this surface
+ tempBounds = *bounds;
+ tempBounds.clip(Common::Rect(0, 0, this->w, this->h));
+ } else {
+ // No bounds provided, so use the entire surface
+ tempBounds = Common::Rect(0, 0, this->w, this->h);
+ }
+
+ // Fill the area
+ fillRect(tempBounds, color);
+}
+
} // End of namespace Titanic