aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMatthew Hoops2010-06-29 02:55:31 +0000
committerMatthew Hoops2010-06-29 02:55:31 +0000
commit79aa49a509fd82bd3e4a97056efdc1e26913edd5 (patch)
tree38d0a889b36eb9dc7a144a29a27feaaab47502f4 /engines/mohawk
parent36e583944fad8658948522566014b79833fc3bfc (diff)
downloadscummvm-rg350-79aa49a509fd82bd3e4a97056efdc1e26913edd5.tar.gz
scummvm-rg350-79aa49a509fd82bd3e4a97056efdc1e26913edd5.tar.bz2
scummvm-rg350-79aa49a509fd82bd3e4a97056efdc1e26913edd5.zip
Fix the load game dialog in Riven DVD's menu, borrowed from Parallaction.
svn-id: r50477
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/riven.cpp17
-rw-r--r--engines/mohawk/riven.h1
2 files changed, 13 insertions, 5 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 44b7868373..77559b67e4 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -76,7 +76,6 @@ MohawkEngine_Riven::~MohawkEngine_Riven() {
delete _extrasFile;
delete _saveLoad;
delete[] _vars;
- delete _loadDialog;
delete _optionsDialog;
delete _rnd;
delete g_atrusJournalRect1;
@@ -100,8 +99,6 @@ Common::Error MohawkEngine_Riven::run() {
_console = new RivenConsole(this);
_saveLoad = new RivenSaveLoad(this, _saveFileMan);
_externalScriptHandler = new RivenExternal(this);
- _loadDialog = new GUI::SaveLoadChooser("Load Game:", "Load");
- _loadDialog->setSaveMode(false);
_optionsDialog = new RivenOptionsDialog(this);
_rnd = new Common::RandomSource();
@@ -600,7 +597,19 @@ void MohawkEngine_Riven::runHotspotScript(uint16 hotspot, uint16 scriptType) {
}
void MohawkEngine_Riven::runLoadDialog() {
- runDialog(*_loadDialog);
+ GUI::SaveLoadChooser slc("Load Game:", "Load");
+ slc.setSaveMode(false);
+
+ Common::String gameId = ConfMan.get("gameid");
+
+ const EnginePlugin *plugin = 0;
+ EngineMan.findGame(gameId, &plugin);
+
+ int slot = slc.runModal(plugin, ConfMan.getActiveDomainName());
+ if (slot >= 0)
+ loadGameState(slot);
+
+ slc.close();
}
Common::Error MohawkEngine_Riven::loadGameState(int slot) {
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index 5fe0de00e9..3e2ab59597 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -128,7 +128,6 @@ private:
MohawkArchive *_extrasFile; // We need a separate handle for the extra data
RivenConsole *_console;
RivenSaveLoad *_saveLoad;
- GUI::SaveLoadChooser *_loadDialog;
RivenOptionsDialog *_optionsDialog;
// Stack/Card-related functions and variables