ZVISION: Create method to clear the working window area of the screen to a single color

This commit is contained in:
richiesams 2013-08-19 23:49:38 -05:00
parent 760dd3e632
commit 7c02b66b2e
2 changed files with 17 additions and 0 deletions

View File

@ -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;

View File

@ -102,6 +102,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!