aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorrichiesams2013-08-19 23:49:38 -0500
committerrichiesams2013-08-20 11:41:34 -0500
commit7c02b66b2e556816c70b75e69e53ba1fb3d1b895 (patch)
tree90921bc6bda9c946f0b098dfba2896ee1f7c4c7c /engines/zvision
parent760dd3e63202ff92d206fb83015f8b05e4aa969c (diff)
downloadscummvm-rg350-7c02b66b2e556816c70b75e69e53ba1fb3d1b895.tar.gz
scummvm-rg350-7c02b66b2e556816c70b75e69e53ba1fb3d1b895.tar.bz2
scummvm-rg350-7c02b66b2e556816c70b75e69e53ba1fb3d1b895.zip
ZVISION: Create method to clear the working window area of the screen to a single color
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/render_manager.cpp10
-rw-r--r--engines/zvision/render_manager.h7
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp
index 4e67cbbd7b..6c006d9320 100644
--- a/engines/zvision/render_manager.cpp
+++ b/engines/zvision/render_manager.cpp
@@ -79,6 +79,16 @@ void RenderManager::update(uint deltaTimeInMillis) {
}
}
+void RenderManager::clearWorkingWindowToColor(uint16 color) {
+ uint32 workingWindowSize = _workingWidth * _workingHeight;
+
+ for (uint32 i = 0; i < workingWindowSize; i++) {
+ _workingWindowBuffer[i] = color;
+ }
+
+ _system->copyRectToScreen(_workingWindowBuffer, _workingWidth * sizeof(uint16), _workingWindow.left, _workingWindow.top, _workingWidth, _workingHeight);
+}
+
void RenderManager::renderSubRectToScreen(Graphics::Surface &surface, int16 destinationX, int16 destinationY, bool wrap, bool isTransposed) {
int16 subRectX = 0;
int16 subRectY = 0;
diff --git a/engines/zvision/render_manager.h b/engines/zvision/render_manager.h
index 5b517031ae..d82e40fa4c 100644
--- a/engines/zvision/render_manager.h
+++ b/engines/zvision/render_manager.h
@@ -103,6 +103,13 @@ public:
void update(uint deltaTimeInMillis);
/**
+ * Fills the entire workingWindow with the specified color
+ *
+ * @param color The color to fill the working window with. (In RGB 555)
+ */
+ void clearWorkingWindowToColor(uint16 color);
+
+ /**
* Blits the image or a portion of the image to the backbuffer. Actual screen updates won't happen until the end of the frame.
* The image will be clipped to fit inside the working window. Coords are in working window space, not screen space!
*