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.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.cpp')
-rw-r--r-- | engines/gob/draw.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index ff6d558998..36b75dc2eb 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -914,7 +914,7 @@ void Draw::winDraw(int16 fct) { int table[10]; SurfaceDescPtr tempSrf; - if (_destSurface == 21) { + if (_destSurface == kBackSurface) { if (_vm->_global->_curWinId) { if (_fascinWin[_vm->_global->_curWinId].id == -1) @@ -1032,7 +1032,7 @@ void Draw::winDraw(int16 fct) { table[_fascinWin[i].id] = i; } - if ((_sourceSurface == 21) && (fct == 0)) { + if ((_sourceSurface == kBackSurface) && (fct == 0)) { _vm->_video->drawSprite(*_spritesArray[_sourceSurface], *_spritesArray[_destSurface], _spriteLeft, _spriteTop, _spriteLeft + _spriteRight - 1, _spriteTop + _spriteBottom - 1, _destSpriteX, _destSpriteY, _transparency); @@ -1267,11 +1267,11 @@ void Draw::winDraw(int16 fct) { } if (_renderFlags & 16) { - if (_sourceSurface == 21) { + if (_sourceSurface == kBackSurface) { _spriteLeft -= _backDeltaX; _spriteTop -= _backDeltaY; } - if (_destSurface == 21) { + if (_destSurface == kBackSurface) { _destSpriteX -= _backDeltaX; _destSpriteY -= _backDeltaY; } @@ -1323,9 +1323,9 @@ void Draw::forceBlit(bool backwards) { return; if (_frontSurface == _backSurface) return; - if (_spritesArray[20] != _frontSurface) + if (_spritesArray[kFrontSurface] != _frontSurface) return; - if (_spritesArray[21] != _backSurface) + if (_spritesArray[kBackSurface] != _backSurface) return; if (!backwards) { |