diff options
-rw-r--r-- | engines/cruise/menu.cpp | 2 | ||||
-rw-r--r-- | engines/dialogs.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/file.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/hugo.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/hugo.h | 4 | ||||
-rw-r--r-- | engines/mohawk/riven.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kfile.cpp | 4 | ||||
-rw-r--r-- | engines/toon/toon.cpp | 4 | ||||
-rw-r--r-- | gui/launcher.cpp | 2 | ||||
-rw-r--r-- | gui/saveload.cpp | 2 | ||||
-rw-r--r-- | gui/saveload.h | 2 |
12 files changed, 18 insertions, 18 deletions
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp index e5a1136c23..a722b947ff 100644 --- a/engines/cruise/menu.cpp +++ b/engines/cruise/menu.cpp @@ -218,7 +218,7 @@ static void handleSaveLoad(bool saveFlag) { dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); dialog->setSaveMode(saveFlag); - int slot = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + int slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (slot >= 0) { if (!saveFlag) diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 0d70be1ccd..7c75837551 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -224,7 +224,7 @@ void MainMenuDialog::save() { const EnginePlugin *plugin = 0; EngineMan.findGame(gameId, &plugin); - int slot = _saveDialog->runModal(plugin, ConfMan.getActiveDomainName()); + int slot = _saveDialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (slot >= 0) { Common::String result(_saveDialog->getResultString()); @@ -247,7 +247,7 @@ void MainMenuDialog::load() { const EnginePlugin *plugin = 0; EngineMan.findGame(gameId, &plugin); - int slot = _loadDialog->runModal(plugin, ConfMan.getActiveDomainName()); + int slot = _loadDialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (slot >= 0) { // FIXME: For now we just ignore the return diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index b17d3c9c6a..09d0272519 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -308,7 +308,7 @@ bool FileManager::saveGame(const int16 slot, const Common::String descrip) { if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save"); dialog->setSaveMode(true); - savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); savegameDescription = dialog->getResultString(); delete dialog; } else { @@ -422,7 +422,7 @@ bool FileManager::restoreGame(const int16 slot) { if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore"); dialog->setSaveMode(false); - savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; } else { savegameId = slot; diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index ec6f4943db..1496e26501 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -1114,11 +1114,11 @@ void HugoEngine::endGame() { _status.viewState = kViewExit; } -bool HugoEngine::canLoadGameStateCurrently() const { +bool HugoEngine::canLoadGameStateCurrently() { return true; } -bool HugoEngine::canSaveGameStateCurrently() const { +bool HugoEngine::canSaveGameStateCurrently() { return (_status.viewState == kViewPlay); } diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 2cec62afe2..98723ea8ad 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -307,8 +307,8 @@ public: return *s_Engine; } - bool canLoadGameStateCurrently() const; - bool canSaveGameStateCurrently() const; + virtual bool canLoadGameStateCurrently(); + virtual bool canSaveGameStateCurrently(); bool loadHugoDat(); char *useBG(const char *name); diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 935ab4b45f..abc7f5304e 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -684,7 +684,7 @@ void MohawkEngine_Riven::runLoadDialog() { const EnginePlugin *plugin = 0; EngineMan.findGame(gameId, &plugin); - int slot = slc.runModal(plugin, ConfMan.getActiveDomainName()); + int slot = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (slot >= 0) loadGameState(slot); diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index da41e2c9a3..b8116d6bc7 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -192,7 +192,7 @@ int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const const EnginePlugin *plugin = 0; EngineMan.findGame(gameId, &plugin); - int idx = slc.runModal(plugin, ConfMan.getActiveDomainName()); + int idx = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (idx >= 0) { selectedName = slc.getResultString(); slc.close(); diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 5f1445247f..9fd61fa10d 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -575,7 +575,7 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { EngineMan.findGame(g_sci->getGameIdStr(), &plugin); GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); dialog->setSaveMode(true); - savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); game_description = dialog->getResultString(); if (game_description.empty()) { // create our own description for the saved game, the user didnt enter it @@ -675,7 +675,7 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { EngineMan.findGame(g_sci->getGameIdStr(), &plugin); GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore")); dialog->setSaveMode(false); - savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; if (savegameId < 0) { g_sci->_soundCmd->pauseAll(false); // unpause music diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 9027f36717..703e0a030f 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -2976,7 +2976,7 @@ bool ToonEngine::saveGame(int32 slot, Common::String saveGameDesc) { if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save"); dialog->setSaveMode(true); - savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); savegameDescription = dialog->getResultString(); delete dialog; } else { @@ -3074,7 +3074,7 @@ bool ToonEngine::loadGame(int32 slot) { if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore"); dialog->setSaveMode(false); - savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; } else { savegameId = slot; diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 411825465f..49133002b6 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -934,7 +934,7 @@ void LauncherDialog::loadGame(int item) { if (plugin) { if ((*plugin)->hasFeature(MetaEngine::kSupportsListSaves) && (*plugin)->hasFeature(MetaEngine::kSupportsLoadingDuringStartup)) { - int slot = _loadDialog->runModal(plugin, target); + int slot = _loadDialog->runModalWithPluginAndTarget(plugin, target); if (slot >= 0) { ConfMan.setActiveDomain(_domains[item]); ConfMan.setInt("save_slot", slot, Common::ConfigManager::kTransientDomain); diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 939e2ca6e9..41b6018e3b 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -79,7 +79,7 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel) SaveLoadChooser::~SaveLoadChooser() { } -int SaveLoadChooser::runModal(const EnginePlugin *plugin, const String &target) { +int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { if (_gfxWidget) _gfxWidget->setGfx(0); diff --git a/gui/saveload.h b/gui/saveload.h index dde70c9a7a..d8977693bc 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -66,7 +66,7 @@ public: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); void setList(const StringArray& list); - int runModal(const EnginePlugin *plugin, const String &target); + int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); void open(); const Common::String &getResultString() const; |