aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-08-19 08:49:53 +0000
committerFilippos Karapetis2008-08-19 08:49:53 +0000
commit15722c8ee8a216c96db167b9e381e4ed527d5c31 (patch)
tree718a9b4634c0aee4a5690c7f91a3baeaa7c51d3e /engines
parentc528106b866bc995c6da818ff98479d92652f567 (diff)
downloadscummvm-rg350-15722c8ee8a216c96db167b9e381e4ed527d5c31.tar.gz
scummvm-rg350-15722c8ee8a216c96db167b9e381e4ed527d5c31.tar.bz2
scummvm-rg350-15722c8ee8a216c96db167b9e381e4ed527d5c31.zip
Fix for bug #2057194 - "IHNM: -x option crashes ScummVM, if savegame doesn't exist"
svn-id: r34023
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/saga.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index fafbd02cec..34cd70e47e 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -255,13 +255,20 @@ int SagaEngine::go() {
_interface->addToInventory(_actor->objIndexToId(0)); // Magic hat
_scene->changeScene(ConfMan.getInt("boot_param"), 0, kTransitionNoFade);
} else if (ConfMan.hasKey("save_slot")) {
+ // Init the current chapter to 8 (character selection) for IHNM
+ if (getGameType() == GType_IHNM)
+ _scene->changeScene(-2, 0, kTransitionFade, 8);
+
// First scene sets up palette
_scene->changeScene(getStartSceneNumber(), 0, kTransitionNoFade);
_events->handleEvents(0); // Process immediate events
- _interface->setMode(kPanelMain);
- char *fileName;
- fileName = calcSaveFileName(ConfMan.getInt("save_slot"));
+ if (getGameType() != GType_IHNM)
+ _interface->setMode(kPanelMain);
+ else
+ _interface->setMode(kPanelChapterSelection);
+
+ char *fileName = calcSaveFileName(ConfMan.getInt("save_slot"));
load(fileName);
} else {
_framesEsc = 0;