[Scummvm-cvs-logs] SF.net SVN: scummvm: [30682] scummvm/trunk/engines/parallaction/gui_ns.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Jan 28 18:36:09 CET 2008
Revision: 30682
http://scummvm.svn.sourceforge.net/scummvm/?rev=30682&view=rev
Author: peres001
Date: 2008-01-28 09:36:08 -0800 (Mon, 28 Jan 2008)
Log Message:
-----------
Changed guiSelectCharacter to work with only screen buffer.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/gui_ns.cpp
Modified: scummvm/trunk/engines/parallaction/gui_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gui_ns.cpp 2008-01-28 17:28:16 UTC (rev 30681)
+++ scummvm/trunk/engines/parallaction/gui_ns.cpp 2008-01-28 17:36:08 UTC (rev 30682)
@@ -383,9 +383,6 @@
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 @@
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 _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 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list