[Scummvm-cvs-logs] SF.net SVN: scummvm:[49080] scummvm/trunk/engines/saga/introproc_saga2.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue May 18 16:57:02 CEST 2010


Revision: 49080
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49080&view=rev
Author:   thebluegr
Date:     2010-05-18 14:57:02 +0000 (Tue, 18 May 2010)

Log Message:
-----------
Added back video skipping in SAGA2 with the escape key or left mouse button

Modified Paths:
--------------
    scummvm/trunk/engines/saga/introproc_saga2.cpp

Modified: scummvm/trunk/engines/saga/introproc_saga2.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_saga2.cpp	2010-05-18 14:17:24 UTC (rev 49079)
+++ scummvm/trunk/engines/saga/introproc_saga2.cpp	2010-05-18 14:57:02 UTC (rev 49080)
@@ -99,8 +99,9 @@
 
 	uint16 x = (g_system->getWidth() - smkDecoder->getWidth()) / 2;
 	uint16 y = (g_system->getHeight() - smkDecoder->getHeight()) / 2;
+	bool skipVideo = false;
 
-	while (!_vm->shouldQuit() && !smkDecoder->endOfVideo()) {
+	while (!_vm->shouldQuit() && !smkDecoder->endOfVideo() && !skipVideo) {
 		if (smkDecoder->needsUpdate()) {
 			Graphics::Surface *frame = smkDecoder->decodeNextFrame();
 			if (frame) {
@@ -114,8 +115,10 @@
 		}
 	
 		Common::Event event;
-		while (_vm->_system->getEventManager()->pollEvent(event))
-			;
+		while (_vm->_system->getEventManager()->pollEvent(event)) {
+			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
+				skipVideo = true;
+		}
 
 		_vm->_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