aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sludge/sprites.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp
index c0fe9e3a54..39bb65211d 100644
--- a/engines/sludge/sprites.cpp
+++ b/engines/sludge/sprites.cpp
@@ -305,6 +305,11 @@ void pasteSpriteToBackDrop(int x1, int y1, sprite &single, const spritePalette &
Graphics::TransparentSurface tmp(single.surface, false);
tmp.blit(backdropSurface, x1, y1, Graphics::FLIP_NONE, nullptr,
TS_RGB(fontPal.originalRed, fontPal.originalGreen, fontPal.originalBlue));
+
+ // reset zBuffer with the new backdrop
+ if (zBuffer.numPanels) {
+ setZBuffer(zBuffer.originalNum);
+ }
}
// burnSpriteToBackDrop adds text in the colour specified by setBurnColour
@@ -316,6 +321,11 @@ void burnSpriteToBackDrop(int x1, int y1, sprite &single, const spritePalette &f
Graphics::TransparentSurface tmp(single.surface, false);
tmp.blit(backdropSurface, x1, y1, Graphics::FLIP_NONE, nullptr,
TS_RGB(currentBurnR, currentBurnG, currentBurnB));
+
+ // reset zBuffer with the new backdrop
+ if (zBuffer.numPanels) {
+ setZBuffer(zBuffer.originalNum);
+ }
}
void fontSprite(bool flip, int x, int y, sprite &single, const spritePalette &fontPal) {