mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 03:24:50 +00:00
PEGASUS: Implement demo credits
This commit is contained in:
parent
35cc9b5d0f
commit
17d6f74867
@ -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
|
||||
|
@ -133,6 +133,7 @@ private:
|
||||
// Misc.
|
||||
Hotspot _returnHotspot;
|
||||
void showLoadDialog();
|
||||
void showTempScreen(const Common::String &fileName);
|
||||
|
||||
// Menu
|
||||
GameMenu *_gameMenu;
|
||||
|
Loading…
x
Reference in New Issue
Block a user