aboutsummaryrefslogtreecommitdiff
path: root/engines/prince
diff options
context:
space:
mode:
authorlukaslw2014-11-08 23:51:56 +0100
committerlukaslw2014-11-08 23:51:56 +0100
commite33383b19f361cb3eabdc4c3322e623917438d32 (patch)
treebe09f60b02001d6a159a1b81988471dca27ae26f /engines/prince
parent71eedf9a3ebae5ba3c8bba075e4bc02fa5c474b2 (diff)
downloadscummvm-rg350-e33383b19f361cb3eabdc4c3322e623917438d32.tar.gz
scummvm-rg350-e33383b19f361cb3eabdc4c3322e623917438d32.tar.bz2
scummvm-rg350-e33383b19f361cb3eabdc4c3322e623917438d32.zip
PRINCE: showLogo() - allow to skip logo animation or quit game during it
Diffstat (limited to 'engines/prince')
-rw-r--r--engines/prince/prince.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 1c0198d6f6..144876ca75 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;
+ }
+ }
}
}