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/inter_v1.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/inter_v1.cpp')
-rw-r--r-- | engines/gob/inter_v1.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 9e841e7e68..11fe0c9c5e 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -328,7 +328,7 @@ void Inter_v1::o1_initCursor() { (height != _vm->_draw->_cursorHeight) || (_vm->_draw->_cursorSprites->getWidth() != (width * count))) { - _vm->_draw->freeSprite(23); + _vm->_draw->freeSprite(Draw::kCursorSurface); _vm->_draw->_cursorSprites.reset(); _vm->_draw->_cursorSpritesBack.reset(); _vm->_draw->_scummvmCursor.reset(); @@ -344,9 +344,9 @@ void Inter_v1::o1_initCursor() { if (count > 0x80) count -= 0x80; - _vm->_draw->initSpriteSurf(23, _vm->_draw->_cursorWidth * count, + _vm->_draw->initSpriteSurf(Draw::kCursorSurface, _vm->_draw->_cursorWidth * count, _vm->_draw->_cursorHeight, 2); - _vm->_draw->_cursorSpritesBack = _vm->_draw->_spritesArray[23]; + _vm->_draw->_cursorSpritesBack = _vm->_draw->_spritesArray[Draw::kCursorSurface]; _vm->_draw->_cursorSprites = _vm->_draw->_cursorSpritesBack; _vm->_draw->_scummvmCursor = @@ -482,14 +482,14 @@ void Inter_v1::o1_initMult() { if (_vm->_mult->_animSurf && ((oldAnimWidth != _vm->_mult->_animWidth) || (oldAnimHeight != _vm->_mult->_animHeight))) { - _vm->_draw->freeSprite(22); + _vm->_draw->freeSprite(Draw::kAnimSurface); _vm->_mult->_animSurf.reset(); } if (!_vm->_mult->_animSurf) { - _vm->_draw->initSpriteSurf(22, _vm->_mult->_animWidth, + _vm->_draw->initSpriteSurf(Draw::kAnimSurface, _vm->_mult->_animWidth, _vm->_mult->_animHeight, 0); - _vm->_mult->_animSurf = _vm->_draw->_spritesArray[22]; + _vm->_mult->_animSurf = _vm->_draw->_spritesArray[Draw::kAnimSurface]; } _vm->_video->drawSprite(*_vm->_draw->_backSurface, *_vm->_mult->_animSurf, @@ -922,7 +922,7 @@ bool Inter_v1::o1_printText(OpFuncParams ¶ms) { _vm->_draw->_backColor = _vm->_game->_script->readValExpr(); _vm->_draw->_frontColor = _vm->_game->_script->readValExpr(); _vm->_draw->_fontIndex = _vm->_game->_script->readValExpr(); - _vm->_draw->_destSurface = 21; + _vm->_draw->_destSurface = Draw::kBackSurface; _vm->_draw->_textToPrint = buf; _vm->_draw->_transparency = 0; |