Permalink
Browse files

SLUDGE: Reset zBuffers when blank back drop

  • Loading branch information...
yinsimei committed Aug 2, 2017
1 parent 485a00b commit c4fbb545a67635f58a7163bf01500f763e25df36
Showing with 10 additions and 0 deletions.
  1. +10 −0 engines/sludge/backdrop.cpp
@@ -300,6 +300,11 @@ void GraphicsManager::blankScreen(int x1, int y1, int x2, int y2) {
y2 = (int)_sceneHeight;
_backdropSurface.fillRect(Common::Rect(x1, y1, x2, y2), _currentBlankColour);
// reset zBuffer
if (_zBuffer->originalNum >= 0) {
setZBuffer(_zBuffer->originalNum);
}
}
void GraphicsManager::blankAllScreen() {
@@ -345,6 +350,11 @@ void GraphicsManager::drawHorizontalLine(uint x1, uint y, uint x2) {
void GraphicsManager::darkScreen() {
Graphics::TransparentSurface tmp(_backdropSurface, false);
tmp.blit(_backdropSurface, 0, 0, Graphics::FLIP_NONE, nullptr, TS_ARGB(0, 255 >> 1, 0, 0));
// reset zBuffer
if (_zBuffer->originalNum >= 0) {
setZBuffer(_zBuffer->originalNum);
}
}
void GraphicsManager::drawBackDrop() {

0 comments on commit c4fbb54

Please sign in to comment.