mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
PEGASUS: Allow for loading games from the launcher/cli
This commit is contained in:
parent
820e424e98
commit
e998fb6c0e
@ -111,6 +111,7 @@ public:
|
||||
bool PegasusMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||
return
|
||||
(f == kSupportsListSaves)
|
||||
|| (f == kSupportsLoadingDuringStartup)
|
||||
|| (f == kSupportsDeleteSave);
|
||||
}
|
||||
|
||||
|
@ -143,10 +143,6 @@ Common::Error PegasusEngine::run() {
|
||||
_biochips.setWeightLimit(8);
|
||||
_biochips.setOwnerID(kPlayerID);
|
||||
|
||||
// Start up the first notification
|
||||
_shellNotification.notifyMe(this, kJMPShellNotificationFlags, kJMPShellNotificationFlags);
|
||||
_shellNotification.setNotificationFlags(kGameStartingFlag, kGameStartingFlag);
|
||||
|
||||
_returnHotspot.setArea(Common::Rect(kNavAreaLeft, kNavAreaTop, 512 + kNavAreaLeft, 256 + kNavAreaTop));
|
||||
_returnHotspot.setHotspotFlags(kInfoReturnSpotFlag);
|
||||
g_allHotspots.push_back(&_returnHotspot);
|
||||
@ -154,6 +150,19 @@ Common::Error PegasusEngine::run() {
|
||||
_screenDimmer.setBounds(Common::Rect(0, 0, 640, 480));
|
||||
_screenDimmer.setDisplayOrder(kScreenDimmerOrder);
|
||||
|
||||
// Load from the launcher/cli if requested (and don't show the intro in those cases)
|
||||
bool doIntro = true;
|
||||
if (ConfMan.hasKey("save_slot")) {
|
||||
uint32 gameToLoad = ConfMan.getInt("save_slot");
|
||||
doIntro = (loadGameState(gameToLoad).getCode() != Common::kNoError);
|
||||
}
|
||||
|
||||
if (doIntro) {
|
||||
// Start up the first notification
|
||||
_shellNotification.notifyMe(this, kJMPShellNotificationFlags, kJMPShellNotificationFlags);
|
||||
_shellNotification.setNotificationFlags(kGameStartingFlag, kGameStartingFlag);
|
||||
}
|
||||
|
||||
while (!shouldQuit()) {
|
||||
processShell();
|
||||
_system->delayMillis(10); // Ease off the CPU
|
||||
|
Loading…
x
Reference in New Issue
Block a user