[Scummvm-cvs-logs] SF.net SVN: scummvm:[34914] scummvm/trunk/engines/agi

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Nov 6 17:31:35 CET 2008


Revision: 34914
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34914&view=rev
Author:   thebluegr
Date:     2008-11-06 16:31:34 +0000 (Thu, 06 Nov 2008)

Log Message:
-----------
Fix for bug #2071125 - "MICKEY: Mouse movement?\226?\128?\143", by using the waitForTimer() function from the SCUMM engine

Modified Paths:
--------------
    scummvm/trunk/engines/agi/preagi.h
    scummvm/trunk/engines/agi/preagi_common.cpp

Modified: scummvm/trunk/engines/agi/preagi.h
===================================================================
--- scummvm/trunk/engines/agi/preagi.h	2008-11-06 15:41:38 UTC (rev 34913)
+++ scummvm/trunk/engines/agi/preagi.h	2008-11-06 16:31:34 UTC (rev 34914)
@@ -88,6 +88,7 @@
 	Common::SaveFileManager* getSaveFileMan() { return _saveFileMan; }
 
 	void playNote(int16 frequency, int32 length);
+	void waitForTimer(int msec_delay);
 
 private:
 	int _defaultColor;

Modified: scummvm/trunk/engines/agi/preagi_common.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_common.cpp	2008-11-06 15:41:38 UTC (rev 34913)
+++ scummvm/trunk/engines/agi/preagi_common.cpp	2008-11-06 16:31:34 UTC (rev 34914)
@@ -193,7 +193,17 @@
 
 void PreAgiEngine::playNote(int16 frequency, int32 length) {
 	_speakerStream->play(Audio::PCSpeaker::kWaveFormSquare, frequency, length);
-	_system->delayMillis(length);
+	waitForTimer(length);
 }
 
+void PreAgiEngine::waitForTimer(int msec_delay) {
+	uint32 start_time = _system->getMillis();
+
+	while (_system->getMillis() < start_time + msec_delay) {
+		_gfx->doUpdate();
+		_system->updateScreen();
+		_system->delayMillis(10);
+	}
 }
+
+}


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