[Scummvm-cvs-logs] SF.net SVN: scummvm: [28097] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Jul 15 12:10:48 CEST 2007


Revision: 28097
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28097&view=rev
Author:   peres001
Date:     2007-07-15 03:10:48 -0700 (Sun, 15 Jul 2007)

Log Message:
-----------
Screen update is no more triggered automatically when performing full screen-size blits on Front buffer. Menu code has been changed accordingly to retain consistency.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/menu.cpp
    scummvm/trunk/engines/parallaction/zone.cpp

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2007-07-15 09:52:08 UTC (rev 28096)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2007-07-15 10:10:48 UTC (rev 28097)
@@ -285,7 +285,7 @@
 void Gfx::copyScreen(Gfx::Buffers srcbuffer, Gfx::Buffers dstbuffer) {
 	memcpy(_buffers[dstbuffer], _buffers[srcbuffer], SCREEN_WIDTH*SCREEN_HEIGHT);
 
-	if (dstbuffer == kBitFront) updateScreen();
+//	if (dstbuffer == kBitFront) updateScreen();
 
 	return;
 }

Modified: scummvm/trunk/engines/parallaction/menu.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/menu.cpp	2007-07-15 09:52:08 UTC (rev 28096)
+++ scummvm/trunk/engines/parallaction/menu.cpp	2007-07-15 10:10:48 UTC (rev 28097)
@@ -130,11 +130,13 @@
 	_vm->_disk->loadSlide("intro");
 	_vm->_gfx->setPalette(_vm->_gfx->_palette);
 	_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
+	_vm->_gfx->updateScreen();
 	g_system->delayMillis(2000);
 
 	_vm->_disk->loadSlide("minintro");
 	_vm->_gfx->setPalette(_vm->_gfx->_palette);
 	_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
+	_vm->_gfx->updateScreen();
 	g_system->delayMillis(2000);
 
 }
@@ -203,14 +205,10 @@
 
 	_vm->_gfx->displayString(60, 30, "SELECT LANGUAGE", 1);
 
-	_vm->_gfx->copyScreen(Gfx::kBitFront, Gfx::kBitBack);
-	_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBit2);
-
 	_vm->changeCursor(kCursorArrow);
 
 	do {
 		_vm->updateInput();
-		_vm->_gfx->swapBuffers();
 
 		if (_mouseButtons == kMouseLeftUp) {
 			for (uint16 _si = 0; _si < 4; _si++) {
@@ -242,7 +240,8 @@
 			}
 		}
 
-		_vm->waitTime( 1 );
+		g_system->delayMillis(30);
+		_vm->_gfx->updateScreen();
 
 	} while (true);
 
@@ -261,41 +260,33 @@
 
 	_vm->_disk->loadSlide("restore");
 	_vm->_gfx->setPalette(_vm->_gfx->_palette);
-	_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
 
-	_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBit2);
-
-
 	uint16 _si = 0;
 	uint16 _di = 3;
 
-	_vm->updateInput();
+	_mouseButtons = kMouseNone;
 	while (_mouseButtons != kMouseLeftUp) {
 
 		_vm->updateInput();
-		_vm->_gfx->swapBuffers();
-		_vm->waitTime( 1 );
 
-		_si = 0;
-		if (_vm->_mousePos.x > 160)
-			_si = 1;
+		_si = (_vm->_mousePos.x > 160) ? 1 : 0;
 
-		if (_si == _di) continue;
+		if (_si != _di) {
+			_di = _si;
 
-		_di = _si;
-		_vm->_gfx->copyScreen(Gfx::kBit2, Gfx::kBitFront);
+			_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
+			if (_si != 0) {
+				// load a game
+				_vm->_gfx->displayString(60, 30, loadGameMsg[_language], 1);
+			} else {
+				// new game
+				_vm->_gfx->displayString(60, 30, newGameMsg[_language], 1);
+			}
 
-		if (_si != 0) {
-			// load a game
-			_vm->_gfx->displayString(60, 30, loadGameMsg[_language], 1);
-		} else {
-			// new game
-			_vm->_gfx->displayString(60, 30, newGameMsg[_language], 1);
 		}
 
+		g_system->delayMillis(30);
 		_vm->_gfx->updateScreen();
-		_vm->_gfx->copyScreen(Gfx::kBitFront, Gfx::kBitBack);
-
 	}
 
 	if (_si == 0) return 0; // new game
@@ -421,6 +412,7 @@
 		g_system->delayMillis(2000);
 
 		_vm->_gfx->copyScreen(Gfx::kBit2, Gfx::kBitFront);
+		_vm->_gfx->updateScreen();
 	}
 
 

Modified: scummvm/trunk/engines/parallaction/zone.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/zone.cpp	2007-07-15 09:52:08 UTC (rev 28096)
+++ scummvm/trunk/engines/parallaction/zone.cpp	2007-07-15 10:10:48 UTC (rev 28097)
@@ -310,6 +310,7 @@
 	waitUntilLeftClick();
 
 	_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
+	_gfx->updateScreen();
 
 	return;
 }
@@ -353,6 +354,7 @@
 
 	_gfx->setHalfbriteMode(false);
 	_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
+	_gfx->updateScreen();
 
 	return;
 }


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