aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-08-14 18:20:12 +0200
committerEinar Johan Trøan Sømåen2012-08-14 18:20:12 +0200
commite01dc47414355937d98b1de11151dde7c1c12a00 (patch)
treed7717b903bdbe53a9c7c3a5f78e142864c32e803
parentf37e8fbdb12c7bf6479c51ab8dc73a06d162abc1 (diff)
downloadscummvm-rg350-e01dc47414355937d98b1de11151dde7c1c12a00.tar.gz
scummvm-rg350-e01dc47414355937d98b1de11151dde7c1c12a00.tar.bz2
scummvm-rg350-e01dc47414355937d98b1de11151dde7c1c12a00.zip
WINTERMUTE: Fill the screen with fillRect for now.
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 4c8a80028b..05520ee7a9 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -171,7 +171,7 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
_renderSurface->create(g_system->getWidth(), g_system->getHeight(), g_system->getScreenFormat());
_blankSurface->create(g_system->getWidth(), g_system->getHeight(), g_system->getScreenFormat());
- _blankSurface->fillRect(Common::Rect(0, 0, g_system->getHeight(), g_system->getWidth()), _blankSurface->format.ARGBToColor(255, 0, 0, 0));
+ _blankSurface->fillRect(Common::Rect(0, 0, _blankSurface->h, _blankSurface->w), _blankSurface->format.ARGBToColor(255, 0, 0, 0));
_active = true;
_clearColor = _renderSurface->format.ARGBToColor(255, 0, 0, 0);
@@ -206,7 +206,6 @@ bool BaseRenderOSystem::flip() {
while (it != _renderQueue.end()) {
if ((*it)->_wantsDraw == false) {
RenderTicket *ticket = *it;
- addDirtyRect((*it)->_dstRect);
it = _renderQueue.erase(it);
delete ticket;
} else {
@@ -237,11 +236,12 @@ bool BaseRenderOSystem::fill(byte r, byte g, byte b, Common::Rect *rect) {
return STATUS_OK;
}
if (!rect) {
- if (r == 0 && g == 0 && b == 0) {
+// TODO: This should speed things up, but for some reason it misses the size by quite a bit.
+/* if (r == 0 && g == 0 && b == 0) {
// Simply memcpy from the buffered black-surface, way faster than Surface::fillRect.
memcpy(_renderSurface->pixels, _blankSurface->pixels, _renderSurface->pitch * _renderSurface->h);
return STATUS_OK;
- }
+ }*/
rect = &_renderRect;
}
// TODO: This doesn't work with dirty rects