[Scummvm-git-logs] scummvm master -> 7da077b93aff92f25eb41009891ac806de263ef4

yinsimei roseline.yin at gmail.com
Tue Aug 1 09:32:01 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7da077b93a SLUDGE: Clear screen before every display


Commit: 7da077b93aff92f25eb41009891ac806de263ef4
    https://github.com/scummvm/scummvm/commit/7da077b93aff92f25eb41009891ac806de263ef4
Author: Simei Yin (roseline.yin at gmail.com)
Date: 2017-08-01T09:29:34+02:00

Commit Message:
SLUDGE: Clear screen before every display

Changed paths:
    engines/sludge/graphics.cpp
    engines/sludge/graphics.h
    engines/sludge/sludger.cpp


diff --git a/engines/sludge/graphics.cpp b/engines/sludge/graphics.cpp
index d0333ba..eecf522 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 ecc2bbc..bb84b0b 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 880c808..418ec31 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();





More information about the Scummvm-git-logs mailing list