diff options
author | Nicola Mettifogo | 2008-01-28 17:36:08 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-01-28 17:36:08 +0000 |
commit | a206f6e87331c7c1ae2219657af45f9583fe75c5 (patch) | |
tree | 1afdb4b4cc3a448a0bec93d00993627f17163908 /engines/parallaction | |
parent | 56eed45317dd643528b3980ff7f899fbf0be7bc4 (diff) | |
download | scummvm-rg350-a206f6e87331c7c1ae2219657af45f9583fe75c5.tar.gz scummvm-rg350-a206f6e87331c7c1ae2219657af45f9583fe75c5.tar.bz2 scummvm-rg350-a206f6e87331c7c1ae2219657af45f9583fe75c5.zip |
Changed guiSelectCharacter to work with only screen buffer.
svn-id: r30682
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/gui_ns.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index ad059ac0d2..1ffc20f5e0 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -383,9 +383,6 @@ int Parallaction_ns::guiGetSelectedBlock(const Common::Point &p) { int Parallaction_ns::guiSelectCharacter() { debugC(1, kDebugMenu, "Parallaction_ns::guiselectCharacter()"); - Graphics::Surface v14; - v14.create(BLOCK_WIDTH, BLOCK_HEIGHT, 1); - setArrowCursor(); _soundMan->stopMusic(); @@ -404,6 +401,14 @@ int Parallaction_ns::guiSelectCharacter() { id[0] = _gfx->createLabel(_introFont, introMsg1[_language], 1); id[1] = _gfx->createLabel(_introFont, introMsg2[_language], 1); + Graphics::Surface v14; + v14.create(BLOCK_WIDTH * 8, BLOCK_HEIGHT, 1); + Common::Rect rect(SLOT_X, SLOT_Y, SLOT_X + BLOCK_WIDTH * 8, SLOT_Y + BLOCK_HEIGHT); + _gfx->grabRect((byte*)v14.pixels, rect, Gfx::kBit2, rect.width()); + + Graphics::Surface block; + block.create(BLOCK_WIDTH, BLOCK_HEIGHT, 1); + while (true) { points[0] = 0; @@ -421,8 +426,8 @@ int Parallaction_ns::guiSelectCharacter() { int _si = guiGetSelectedBlock(_mousePos); if (_si != -1) { - _gfx->grabRect((byte*)v14.pixels, codeTrueBlocks[_si], Gfx::kBitFront, BLOCK_WIDTH); - _gfx->flatBlitCnv(&v14, _di * SLOT_WIDTH + SLOT_X, SLOT_Y, Gfx::kBitFront); + _gfx->grabRect((byte*)block.pixels, codeTrueBlocks[_si], Gfx::kBit2, BLOCK_WIDTH); + _gfx->flatBlitCnv(&block, _di * SLOT_WIDTH + SLOT_X, SLOT_Y, Gfx::kBit2); if (keys[0][_di] == _si) { points[0]++; @@ -450,7 +455,7 @@ int Parallaction_ns::guiSelectCharacter() { break; } - _gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront); + _gfx->flatBlitCnv(&v14, SLOT_X, SLOT_Y, Gfx::kBit2); _gfx->hideLabel(id[0]); _gfx->showLabel(id[1], 60, 30); |