From 44159533936ff68da1d92639003ae30fc7611cf1 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Aug 2010 00:35:18 +0000 Subject: 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 --- engines/gob/inter_v1.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/gob/inter_v1.cpp') 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; -- cgit v1.2.3