aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-09-22 09:24:14 -0400
committerMatthew Hoops2011-09-22 09:24:14 -0400
commit17d6f74867994fd38809036602b24a2fc02ef987 (patch)
treefdcf60e5d4da9a175b3d4a80177094ed8a35f3c3 /engines
parent35cc9b5d0f6d18629382e0af85c4eaf634cf3857 (diff)
downloadscummvm-rg350-17d6f74867994fd38809036602b24a2fc02ef987.tar.gz
scummvm-rg350-17d6f74867994fd38809036602b24a2fc02ef987.tar.bz2
scummvm-rg350-17d6f74867994fd38809036602b24a2fc02ef987.zip
PEGASUS: Implement demo credits
Diffstat (limited to 'engines')
-rw-r--r--engines/pegasus/pegasus.cpp41
-rw-r--r--engines/pegasus/pegasus.h1
2 files changed, 41 insertions, 1 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 6ca2efbe7a..97ea63a909 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -558,7 +558,14 @@ void PegasusEngine::doGameMenuCommand(const tGameMenuCommand command) {
error("Start new game (adventure mode)");
break;
case kMenuCmdCredits:
- error("Show credits");
+ if (isDemo()) {
+ showTempScreen("Images/Demo/DemoCredits.pict");
+ // TODO: Fade out
+ _gfx->updateDisplay();
+ // TODO: Fade in
+ } else {
+ error("Show credits");
+ }
break;
case kMenuCmdQuit:
_system->quit();
@@ -755,4 +762,36 @@ void PegasusEngine::doInterfaceOverview() {
// TODO: Cancel save/load requests?
}
+void PegasusEngine::showTempScreen(const Common::String &fileName) {
+ // TODO: Fade out
+
+ Picture picture(0);
+ picture.initFromPICTFile(fileName);
+ picture.setDisplayOrder(kMaxAvailableOrder);
+ picture.startDisplaying();
+ picture.show();
+ _gfx->updateDisplay();
+
+ // TODO: Fade in
+
+ // Wait for the next event
+ bool done = false;
+ while (!shouldQuit() && !done) {
+ Common::Event event;
+ while (_eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
+ case Common::EVENT_KEYDOWN:
+ done = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ _system->delayMillis(10);
+ }
+}
+
} // End of namespace Pegasus
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index d3fcae8cd7..7ad978d009 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -133,6 +133,7 @@ private:
// Misc.
Hotspot _returnHotspot;
void showLoadDialog();
+ void showTempScreen(const Common::String &fileName);
// Menu
GameMenu *_gameMenu;