Permalink
Browse files

SLUDGE: Clear screen before every display

  • Loading branch information...
yinsimei committed Aug 1, 2017
1 parent 0f93962 commit 7da077b93aff92f25eb41009891ac806de263ef4
Showing with 8 additions and 1 deletion.
  1. +5 −0 engines/sludge/graphics.cpp
  2. +1 −0 engines/sludge/graphics.h
  3. +2 −1 engines/sludge/sludger.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;
@@ -61,6 +61,7 @@ class GraphicsManager {
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);
@@ -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();

0 comments on commit 7da077b

Please sign in to comment.