Permalink
Browse files

SLUDGE: Fix zBuffer problem when credit scrolling

  • Loading branch information...
yinsimei committed Aug 18, 2017
1 parent cc84534 commit 9ee81ad12718a355b210df838436dbd4f4384253
Showing with 14 additions and 0 deletions.
  1. +14 −0 engines/sludge/sprites.cpp
View
@@ -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;

0 comments on commit 9ee81ad

Please sign in to comment.