aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSimei Yin2017-08-01 09:29:34 +0200
committerSimei Yin2017-08-01 09:29:34 +0200
commit7da077b93aff92f25eb41009891ac806de263ef4 (patch)
tree2479146214656fe610031e493eb7e6964840d519 /engines
parent0f93962ef4bc43827f878d31a2c0ae3b868276f6 (diff)
downloadscummvm-rg350-7da077b93aff92f25eb41009891ac806de263ef4.tar.gz
scummvm-rg350-7da077b93aff92f25eb41009891ac806de263ef4.tar.bz2
scummvm-rg350-7da077b93aff92f25eb41009891ac806de263ef4.zip
SLUDGE: Clear screen before every display
Diffstat (limited to 'engines')
-rw-r--r--engines/sludge/graphics.cpp5
-rw-r--r--engines/sludge/graphics.h1
-rw-r--r--engines/sludge/sludger.cpp3
3 files changed, 8 insertions, 1 deletions
diff --git a/engines/sludge/graphics.cpp b/engines/sludge/graphics.cpp
index d0333bac8f..eecf52231f 100644
--- a/engines/sludge/graphics.cpp
+++ b/engines/sludge/graphics.cpp
@@ -144,6 +144,11 @@ void GraphicsManager::display() {
g_system->updateScreen();
}
+void GraphicsManager::clear() {
+ _renderSurface.fillRect(Common::Rect(0, 0, _backdropSurface.w, _backdropSurface.h),
+ _renderSurface.format.RGBToColor(0, 0, 0));
+}
+
bool GraphicsManager::loadParallax(uint16 v, uint16 fracX, uint16 fracY) {
if (!_parallaxStuff)
_parallaxStuff = new Parallax;
diff --git a/engines/sludge/graphics.h b/engines/sludge/graphics.h
index ecc2bbc21c..bb84b0b1fb 100644
--- a/engines/sludge/graphics.h
+++ b/engines/sludge/graphics.h
@@ -61,6 +61,7 @@ public:
void setWindowSize(uint winWidth, uint winHeight) { _winWidth = winWidth; _winHeight = winHeight; }
bool init();
void display();
+ void clear();
// Parallax
bool loadParallax(uint16 v, uint16 fracX, uint16 fracY);
diff --git a/engines/sludge/sludger.cpp b/engines/sludge/sludger.cpp
index 880c808a96..418ec31166 100644
--- a/engines/sludge/sludger.cpp
+++ b/engines/sludge/sludger.cpp
@@ -267,7 +267,8 @@ bool initSludge(const Common::String &filename) {
}
void displayBase() {
- g_sludge->_gfxMan->drawBackDrop();// Draw the room
+ g_sludge->_gfxMan->clear(); // Clear screen
+ g_sludge->_gfxMan->drawBackDrop();// Draw Backdrop
g_sludge->_gfxMan->drawZBuffer(g_sludge->_gfxMan->getCamX(), g_sludge->_gfxMan->getCamY(), false);
drawPeople();// Then add any moving characters...
g_sludge->_gfxMan->displaySpriteLayers();