[Scummvm-cvs-logs] SF.net SVN: scummvm: [29577] scummvm/trunk/engines/lure/surface.cpp

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Nov 20 13:39:24 CET 2007


Revision: 29577
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29577&view=rev
Author:   dreammaster
Date:     2007-11-20 04:39:24 -0800 (Tue, 20 Nov 2007)

Log Message:
-----------
Changed the copy protection dialog event loop so the fourth digit pressed will be briefly displayed

Modified Paths:
--------------
    scummvm/trunk/engines/lure/surface.cpp

Modified: scummvm/trunk/engines/lure/surface.cpp
===================================================================
--- scummvm/trunk/engines/lure/surface.cpp	2007-11-20 12:26:06 UTC (rev 29576)
+++ scummvm/trunk/engines/lure/surface.cpp	2007-11-20 12:39:24 UTC (rev 29577)
@@ -1052,7 +1052,7 @@
 		_charIndex = 0;
 
 		while (!events.quitFlag) {
-			while (events.pollEvent()) {
+			while (events.pollEvent() && (_charIndex < 4)) {
 				if (events.type() == Common::EVENT_KEYDOWN) { 
 					if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) {
 						// Remove the last number typed
@@ -1066,9 +1066,8 @@
 						// Number pressed
 						_hotspots[_charIndex + 3]->setFrameNumber(events.event().kbd.ascii - '0');
 						_hotspots[_charIndex + 3]->copyTo(&screen.screen());
-						
-						if (++_charIndex == 4)
-							break;
+
+						++_charIndex;
 					}
 
 					screen.update();
@@ -1076,6 +1075,8 @@
 			}
 
 			g_system->delayMillis(10);
+			if (_charIndex == 4)
+				break;
 		}
 
 		if (events.quitFlag)


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