[Scummvm-cvs-logs] scummvm master -> e33383b19f361cb3eabdc4c3322e623917438d32

lukaslw lukaslw at gmail.com
Sat Nov 8 23:56:28 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e33383b19f PRINCE: showLogo() - allow to skip logo animation or quit game during it


Commit: e33383b19f361cb3eabdc4c3322e623917438d32
    https://github.com/scummvm/scummvm/commit/e33383b19f361cb3eabdc4c3322e623917438d32
Author: lukaslw (lukaslw at gmail.com)
Date: 2014-11-08T23:51:56+01:00

Commit Message:
PRINCE: showLogo() - allow to skip logo animation or quit game during it

Changed paths:
    engines/prince/prince.cpp



diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 1c0198d..144876c 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -403,7 +403,6 @@ void PrinceEngine::init() {
 
 void PrinceEngine::showLogo() {
 	MhwanhDecoder logo;
-	_system->delayMillis(1000 / kFPS * 20);
 	if (Resource::loadResource(&logo, "logo.raw", true)) {
 		loadSample(0, "LOGO.WAV");
 		playSample(0, 0);
@@ -411,7 +410,31 @@ void PrinceEngine::showLogo() {
 		_graph->change();
 		_graph->update(_graph->_frontScreen);
 		setPalette(logo.getPalette());
-		_system->delayMillis(1000 / kFPS * 70);
+
+		uint32 logoStart = _system->getMillis();
+		while (_system->getMillis() < logoStart + 5000) {
+			Common::Event event;
+			Common::EventManager *eventMan = _system->getEventManager();
+			while (eventMan->pollEvent(event)) {
+				switch (event.type) {
+				case Common::EVENT_KEYDOWN:
+					if (event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+						stopSample(0);
+						return;
+					}
+					break;
+				case Common::EVENT_LBUTTONDOWN:
+					stopSample(0);
+					return;
+				default:
+					break;
+				}
+			}
+
+			if (shouldQuit()) {
+				return;
+			}
+		}
 	}
 }
 






More information about the Scummvm-git-logs mailing list