aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-09-22 15:41:05 -0400
committerMatthew Hoops2011-09-22 15:41:05 -0400
commitcde643cc17ed60840f51def25e249ff75cf456f2 (patch)
treeb6a7ca3ac0e18a182014178384be61d851786004
parentea36ec452e9274985b550dc14d1fc33b0438ffba (diff)
downloadscummvm-rg350-cde643cc17ed60840f51def25e249ff75cf456f2.tar.gz
scummvm-rg350-cde643cc17ed60840f51def25e249ff75cf456f2.tar.bz2
scummvm-rg350-cde643cc17ed60840f51def25e249ff75cf456f2.zip
PEGASUS: Allow for skipping the intro
-rw-r--r--engines/pegasus/pegasus.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 5870854ed9..368dc298fb 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -200,24 +200,29 @@ void PegasusEngine::createItem(tItemID itemID, tNeighborhoodID neighborhoodID, t
}
void PegasusEngine::runIntro() {
+ bool skipped = false;
+
Video::SeekableVideoDecoder *video = new Video::QuickTimeDecoder();
if (video->loadFile(_introDirectory + "/BandaiLogo.movie")) {
- while (!shouldQuit() && !video->endOfVideo()) {
+ while (!shouldQuit() && !video->endOfVideo() && !skipped) {
if (video->needsUpdate()) {
const Graphics::Surface *frame = video->decodeNextFrame();
_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, 0, 0, frame->w, frame->h);
_system->updateScreen();
}
- Common::Event event;
- while (_eventMan->pollEvent(event))
- ;
+ Input input;
+ InputHandler::getCurrentInputDevice()->getInput(input, kFilterAllInput);
+ if (input.anyInput())
+ skipped = true;
+
+ _system->delayMillis(10);
}
}
delete video;
- if (shouldQuit())
+ if (shouldQuit() || skipped)
return;
video = new Video::QuickTimeDecoder();
@@ -261,9 +266,12 @@ void PegasusEngine::runIntro() {
scaledFrame.free();
}
- Common::Event event;
- while (_eventMan->pollEvent(event))
- ;
+ Input input;
+ InputHandler::getCurrentInputDevice()->getInput(input, kFilterAllInput);
+ if (input.anyInput())
+ break;
+
+ _system->delayMillis(10);
}
delete video;