diff options
author | Sven Hesse | 2010-08-08 00:35:18 +0000 |
---|---|---|
committer | Sven Hesse | 2010-08-08 00:35:18 +0000 |
commit | 44159533936ff68da1d92639003ae30fc7611cf1 (patch) | |
tree | c164e015498bfef4942893493b15319bbad4a74e /engines/gob/draw_fascin.cpp | |
parent | f8a43ee35f4ca2a409558fbb6bf978cc2ae54ab4 (diff) | |
download | scummvm-rg350-44159533936ff68da1d92639003ae30fc7611cf1.tar.gz scummvm-rg350-44159533936ff68da1d92639003ae30fc7611cf1.tar.bz2 scummvm-rg350-44159533936ff68da1d92639003ae30fc7611cf1.zip |
GOB: Add constants for different surfaces/sprites
Add
static const int kFrontSurface = 20;
static const int kBackSurface = 21;
static const int kAnimSurface = 22;
static const int kCursorSurface = 23;
static const int kCaptureSurface = 30;
to class Draw and substitute the raw numbers in other files with
those aliases, for readability.
svn-id: r51852
Diffstat (limited to 'engines/gob/draw_fascin.cpp')
-rw-r--r-- | engines/gob/draw_fascin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/gob/draw_fascin.cpp b/engines/gob/draw_fascin.cpp index 9d30faa972..1e01db7dfb 100644 --- a/engines/gob/draw_fascin.cpp +++ b/engines/gob/draw_fascin.cpp @@ -53,12 +53,12 @@ void Draw_Fascination::spriteOperation(int16 operation) { _destSurface -= 80; if ((_renderFlags & RENDERFLAG_USEDELTAS) && !deltaVeto) { - if ((_sourceSurface == 21) && (operation != DRAW_LOADSPRITE)) { + if ((_sourceSurface == kBackSurface) && (operation != DRAW_LOADSPRITE)) { _spriteLeft += _backDeltaX; _spriteTop += _backDeltaY; } - if (_destSurface == 21) { + if (_destSurface == kBackSurface) { _destSpriteX += _backDeltaX; _destSpriteY += _backDeltaY; if ((operation == DRAW_DRAWLINE) || @@ -70,7 +70,7 @@ void Draw_Fascination::spriteOperation(int16 operation) { } if (_renderFlags & 0x20) { - if (_destSurface == 21 || (operation == 0 && _sourceSurface == 21)) { + if (_destSurface == kBackSurface || (operation == 0 && _sourceSurface == kBackSurface)) { winDraw(operation); return; } @@ -86,7 +86,7 @@ void Draw_Fascination::spriteOperation(int16 operation) { int16 destSurface = _destSurface; int16 sourceSurface = _sourceSurface; - if (_vm->_video->_splitSurf && ((_destSurface == 20) || (_destSurface == 21))) { + if (_vm->_video->_splitSurf && ((_destSurface == kFrontSurface) || (_destSurface == kBackSurface))) { if ((_destSpriteY >= _vm->_video->_splitStart)) { _destSpriteY -= _vm->_video->_splitStart; if ((operation == DRAW_DRAWLINE) || @@ -340,12 +340,12 @@ void Draw_Fascination::spriteOperation(int16 operation) { } if ((_renderFlags & RENDERFLAG_USEDELTAS) && !deltaVeto) { - if (_sourceSurface == 21) { + if (_sourceSurface == kBackSurface) { _spriteLeft -= _backDeltaX; _spriteTop -= _backDeltaY; } - if (_destSurface == 21) { + if (_destSurface == kBackSurface) { _destSpriteX -= _backDeltaX; _destSpriteY -= _backDeltaY; } |