aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
authorSimei Yin2017-08-18 05:08:56 +0200
committerSimei Yin2017-08-18 05:17:03 +0200
commit9ee81ad12718a355b210df838436dbd4f4384253 (patch)
tree35b55512e722414122e3a684a85184ef7b175191 /engines/sludge
parentcc84534871ef8d609ffd87a8b7ad1219f8ff5935 (diff)
downloadscummvm-rg350-9ee81ad12718a355b210df838436dbd4f4384253.tar.gz
scummvm-rg350-9ee81ad12718a355b210df838436dbd4f4384253.tar.bz2
scummvm-rg350-9ee81ad12718a355b210df838436dbd4f4384253.zip
SLUDGE: Fix zBuffer problem when credit scrolling
Diffstat (limited to 'engines/sludge')
-rw-r--r--engines/sludge/sprites.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp
index 98d88a8337..c37c4a1905 100644
--- a/engines/sludge/sprites.cpp
+++ b/engines/sludge/sprites.cpp
@@ -271,6 +271,13 @@ bool GraphicsManager::loadSpriteBank(int fileNum, SpriteBank &loadhere, bool isF
// pasteSpriteToBackDrop uses the colour specified by the setPasteColour (or setPasteColor)
void GraphicsManager::pasteSpriteToBackDrop(int x1, int y1, Sprite &single, const SpritePalette &fontPal) {
+ // kill zBuffer
+ if (_zBuffer->originalNum >= 0 && _zBuffer->sprites) {
+ int num = _zBuffer->originalNum;
+ killZBuffer();
+ _zBuffer->originalNum = num;
+ }
+
//TODO: shader: useLightTexture
x1 -= single.xhot;
y1 -= single.yhot;
@@ -282,6 +289,13 @@ void GraphicsManager::pasteSpriteToBackDrop(int x1, int y1, Sprite &single, cons
// burnSpriteToBackDrop adds text in the colour specified by setBurnColour
// using the differing brightness levels of the font to achieve an anti-aliasing effect.
void GraphicsManager::burnSpriteToBackDrop(int x1, int y1, Sprite &single, const SpritePalette &fontPal) {
+ // kill zBuffer
+ if (_zBuffer->originalNum >= 0 && _zBuffer->sprites) {
+ int num = _zBuffer->originalNum;
+ killZBuffer();
+ _zBuffer->originalNum = num;
+ }
+
//TODO: shader: useLightTexture
x1 -= single.xhot;
y1 -= single.yhot - 1;