aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMatthew Hoops2010-12-07 18:21:05 +0000
committerMatthew Hoops2010-12-07 18:21:05 +0000
commit2f86db50ef835031aa218b906d96761d4e0f8597 (patch)
tree6abeb004e6c02a22c81662d0806f737b3ebd728a /engines/mohawk
parentd06a3553411c8fb1a638f573f6ceb07a940569b9 (diff)
downloadscummvm-rg350-2f86db50ef835031aa218b906d96761d4e0f8597.tar.gz
scummvm-rg350-2f86db50ef835031aa218b906d96761d4e0f8597.tar.bz2
scummvm-rg350-2f86db50ef835031aa218b906d96761d4e0f8597.zip
MOHAWK: Fix loading from the launcher in Myst
svn-id: r54813
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/myst.cpp50
-rw-r--r--engines/mohawk/myst_saveload.cpp9
2 files changed, 30 insertions, 29 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index e9661f54df..6026eb3462 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -261,34 +261,34 @@ Common::Error MohawkEngine_Myst::run() {
_rnd = new Common::RandomSource();
_mouseClicked = false;
- // Start us on the first stack.
- if (getGameType() == GType_MAKINGOF)
- changeToStack(kMakingOfStack);
- else if (getFeatures() & GF_DEMO)
- changeToStack(kDemoStack);
- else
- changeToStack(kIntroStack);
-
- if (getFeatures() & GF_DEMO)
- changeToCard(2000, true);
- else
- changeToCard(1, true);
+ // Load Help System (Masterpiece Edition Only)
+ if (getFeatures() & GF_ME) {
+ MohawkArchive *mhk = new MohawkArchive();
+ if (!mhk->open("help.dat"))
+ error("Could not load help.dat");
+ _mhk.push_back(mhk);
+ }
// Load game from launcher/command line if requested
- if (ConfMan.hasKey("save_slot") && !(getFeatures() & GF_DEMO)) {
+ if (ConfMan.hasKey("save_slot") && canLoadGameStateCurrently()) {
uint32 gameToLoad = ConfMan.getInt("save_slot");
Common::StringArray savedGamesList = _saveLoad->generateSaveGameList();
if (gameToLoad > savedGamesList.size())
error ("Could not find saved game");
_saveLoad->loadGame(savedGamesList[gameToLoad]);
- }
-
- // Load Help System (Masterpiece Edition Only)
- if (getFeatures() & GF_ME) {
- MohawkArchive *mhk = new MohawkArchive();
- if (!mhk->open("help.dat"))
- error("Could not load help.dat");
- _mhk.push_back(mhk);
+ } else {
+ // Start us on the first stack.
+ if (getGameType() == GType_MAKINGOF)
+ changeToStack(kMakingOfStack);
+ else if (getFeatures() & GF_DEMO)
+ changeToStack(kDemoStack);
+ else
+ changeToStack(kIntroStack);
+
+ if (getFeatures() & GF_DEMO)
+ changeToCard(2000, true);
+ else
+ changeToCard(1, true);
}
// Test Load Function...
@@ -1062,12 +1062,10 @@ void MohawkEngine_Myst::runLoadDialog() {
}
Common::Error MohawkEngine_Myst::loadGameState(int slot) {
- if (_saveLoad->loadGame(_saveLoad->generateSaveGameList()[slot])) {
- changeToStack(kIntroStack);
- changeToCard(5, true);
+ if (_saveLoad->loadGame(_saveLoad->generateSaveGameList()[slot]))
return Common::kNoError;
- } else
- return Common::kUnknownError;
+
+ return Common::kUnknownError;
}
Common::Error MohawkEngine_Myst::saveGameState(int slot, const char *desc) {
diff --git a/engines/mohawk/myst_saveload.cpp b/engines/mohawk/myst_saveload.cpp
index bc75fee2a4..04b2be93bc 100644
--- a/engines/mohawk/myst_saveload.cpp
+++ b/engines/mohawk/myst_saveload.cpp
@@ -65,9 +65,6 @@ Common::StringArray MystSaveLoad::generateSaveGameList() {
}
bool MystSaveLoad::loadGame(const Common::String &filename) {
- if (_vm->getFeatures() & GF_DEMO) // Don't load games in the demo
- return false;
-
Common::InSaveFile *loadFile = _saveFileMan->openForLoading(filename);
if (!loadFile)
return false;
@@ -90,6 +87,9 @@ bool MystSaveLoad::loadGame(const Common::String &filename) {
syncGameState(s);
delete loadFile;
+ // Switch us back to the intro stack
+ _vm->changeToStack(kIntroStack);
+
// Set our default cursor
switch (_v->globals.heldPage) {
case 2:
@@ -105,6 +105,9 @@ bool MystSaveLoad::loadGame(const Common::String &filename) {
_vm->setMainCursor(kDefaultMystCursor);
}
+ // Set us to the linking book
+ _vm->changeToCard(5, true);
+
return true;
}