aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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!
*