diff options
author | Sven Hesse | 2006-06-10 14:37:48 +0000 |
---|---|---|
committer | Sven Hesse | 2006-06-10 14:37:48 +0000 |
commit | 897fa6a5a64a3424ae4ea83b1c7cad77ac7e8200 (patch) | |
tree | 527cb68aa7f5c9cff8f7f01038c4ef2c100db883 /engines/gob/draw_v2.cpp | |
parent | f5fdbcddfb54510ef9f44e4f57d68d84f9055757 (diff) | |
download | scummvm-rg350-897fa6a5a64a3424ae4ea83b1c7cad77ac7e8200.tar.gz scummvm-rg350-897fa6a5a64a3424ae4ea83b1c7cad77ac7e8200.tar.bz2 scummvm-rg350-897fa6a5a64a3424ae4ea83b1c7cad77ac7e8200.zip |
More stub-filling + small clean-up
svn-id: r23012
Diffstat (limited to 'engines/gob/draw_v2.cpp')
-rw-r--r-- | engines/gob/draw_v2.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 4e759e024d..426bf825dc 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -38,6 +38,56 @@ namespace Gob { Draw_v2::Draw_v2(GobEngine *vm) : Draw_v1(vm) { } +void Draw_v2::initBigSprite(int16 index, int16 width, int16 height, int16 flags) { + int i; + int16 partsheight; + int16 remainheight; + int8 fragment; + + if (flags != 0) + flags = 2; + + // .-- sub_CBD0 --- + + for (i = 0; i < 3; i++) + _bigSpritesParts[index][i] = 0; + _spritesHeights[index] = height; + + if (_vm->_video->getRectSize(width, height, flags, _vm->_global->_videoMode) > 65000) { + _spritesHeights[index] = height & 0xFFFE; + while (_vm->_video->getRectSize(width, _spritesHeights[index], flags, + _vm->_global->_videoMode) > 65000) { + _spritesHeights[index] -= 2; + } + + partsheight = _spritesHeights[index]; + _spritesArray[index] = + _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, partsheight, flags); + fragment = 0; + while (partsheight < height) { + remainheight = height - partsheight; + if (_spritesHeights[index] >= remainheight) { + _bigSpritesParts[index][fragment] = + _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, + remainheight, flags); + partsheight = height; + } else { + _bigSpritesParts[index][fragment] = + _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, + _spritesHeights[index], flags); + partsheight += _spritesHeights[index]; + } + _vm->_video->clearSurf(_bigSpritesParts[index][fragment]); + fragment++; + } + } else + _spritesArray[index] = + _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, height, flags); + + _vm->_video->clearSurf(_spritesArray[index]); + // '------ +} + void Draw_v2::printText(void) { int i; char *dataPtr; |