[Scummvm-cvs-logs] SF.net SVN: scummvm:[35620] scummvm/trunk/engines/groovie

scott_t at users.sourceforge.net scott_t at users.sourceforge.net
Tue Dec 30 11:19:16 CET 2008


Revision: 35620
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35620&view=rev
Author:   scott_t
Date:     2008-12-30 10:19:16 +0000 (Tue, 30 Dec 2008)

Log Message:
-----------
Fix for dialogue from Stauf and Ego during puzzles.

Modified Paths:
--------------
    scummvm/trunk/engines/groovie/groovie.cpp
    scummvm/trunk/engines/groovie/script.cpp
    scummvm/trunk/engines/groovie/script.h

Modified: scummvm/trunk/engines/groovie/groovie.cpp
===================================================================
--- scummvm/trunk/engines/groovie/groovie.cpp	2008-12-30 05:14:27 UTC (rev 35619)
+++ scummvm/trunk/engines/groovie/groovie.cpp	2008-12-30 10:19:16 UTC (rev 35620)
@@ -165,6 +165,9 @@
 	
 	checkCD();
 
+	// Game timer counter
+	uint16 tmr = 0;
+
 	// Initialize the CD
 	int cd_num = ConfMan.getInt("cdrom");
 	if (cd_num >= 0)
@@ -217,9 +220,17 @@
 		}
 
 		if (_waitingForInput) {
-			// Still waiting for input, just update the mouse and wait a bit more
+			// Still waiting for input, just update the mouse, game timer and then wait a bit more
 			_cursorMan->animate();
 			_system->updateScreen();
+			tmr++;
+			// Wait a little bit between increments.  While mouse is moving, this triggers 
+			// only negligably slower.
+			if (tmr > 4) {
+				_script.timerTick();
+				tmr = 0;
+			}
+
 			_system->delayMillis(50);
 		} else if (_graphicsMan->isFading()) {
 			// We're waiting for a fading to end, let the CPU rest

Modified: scummvm/trunk/engines/groovie/script.cpp
===================================================================
--- scummvm/trunk/engines/groovie/script.cpp	2008-12-30 05:14:27 UTC (rev 35619)
+++ scummvm/trunk/engines/groovie/script.cpp	2008-12-30 10:19:16 UTC (rev 35620)
@@ -108,6 +108,10 @@
 	_debugger = debugger;
 }
 
+void Script::timerTick() {
+	setVariable(0x103, _variables[0x103] + 1);
+}
+
 bool Script::loadScript(Common::String filename) {
 	// Try to open the script file
 	Common::File scriptfile;

Modified: scummvm/trunk/engines/groovie/script.h
===================================================================
--- scummvm/trunk/engines/groovie/script.h	2008-12-30 05:14:27 UTC (rev 35619)
+++ scummvm/trunk/engines/groovie/script.h	2008-12-30 10:19:16 UTC (rev 35620)
@@ -46,6 +46,8 @@
 	void setDebugger(Debugger *debugger);
 	void setVariable(uint16 varnum, byte value);
 
+	void timerTick();
+
 	bool loadScript(Common::String scriptfile);
 	void directGameLoad(int slot);
 	void step();


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