diff options
author | Paul Gilbert | 2011-09-10 11:22:39 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-09-10 11:22:39 +1000 |
commit | b3773f7c378ccf1ff43091af16c068944f357479 (patch) | |
tree | 93538cb9e6eb57c649ba707a199ed619aefc3296 /engines/tsage/ringworld | |
parent | c75da8051cd81548d112201c347c422fa570ea0b (diff) | |
download | scummvm-rg350-b3773f7c378ccf1ff43091af16c068944f357479.tar.gz scummvm-rg350-b3773f7c378ccf1ff43091af16c068944f357479.tar.bz2 scummvm-rg350-b3773f7c378ccf1ff43091af16c068944f357479.zip |
TSAGE: Cleaned up the savegame code, and enabled it for Blue Force
Diffstat (limited to 'engines/tsage/ringworld')
-rw-r--r-- | engines/tsage/ringworld/ringworld_logic.cpp | 47 | ||||
-rw-r--r-- | engines/tsage/ringworld/ringworld_logic.h | 6 |
2 files changed, 0 insertions, 53 deletions
diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp index 4bd0b0a7f6..a131969633 100644 --- a/engines/tsage/ringworld/ringworld_logic.cpp +++ b/engines/tsage/ringworld/ringworld_logic.cpp @@ -21,8 +21,6 @@ */ #include "common/config-manager.h" -#include "common/translation.h" -#include "gui/saveload.h" #include "tsage/ringworld/ringworld_logic.h" #include "tsage/scenes.h" #include "tsage/tsage.h" @@ -406,51 +404,6 @@ RingworldInvObjectList::RingworldInvObjectList() : /*--------------------------------------------------------------------------*/ -void RingworldGame::restartGame() { - if (MessageDialog::show(RESTART_MSG, CANCEL_BTN_STRING, RESTART_BTN_STRING) == 1) - _globals->_game->restart(); -} - -void RingworldGame::saveGame() { - if (!_vm->canSaveGameStateCurrently()) - MessageDialog::show(SAVING_NOT_ALLOWED_MSG, OK_BTN_STRING); - else { - // Show the save dialog - handleSaveLoad(true, _globals->_sceneHandler->_saveGameSlot, _globals->_sceneHandler->_saveName); - } -} - -void RingworldGame::restoreGame() { - if (!_vm->canLoadGameStateCurrently()) - MessageDialog::show(RESTORING_NOT_ALLOWED_MSG, OK_BTN_STRING); - else { - // Show the load dialog - handleSaveLoad(false, _globals->_sceneHandler->_loadGameSlot, _globals->_sceneHandler->_saveName); - } -} - -void RingworldGame::quitGame() { - if (MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING) == 1) - _vm->quitGame(); -} - -void RingworldGame::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) { - const EnginePlugin *plugin = 0; - EngineMan.findGame(_vm->getGameId(), &plugin); - GUI::SaveLoadChooser *dialog; - if (saveFlag) - dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); - else - dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); - - dialog->setSaveMode(saveFlag); - - saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); - saveName = dialog->getResultString(); - - delete dialog; -} - void RingworldGame::start() { // Set some default flags _globals->setFlag(12); diff --git a/engines/tsage/ringworld/ringworld_logic.h b/engines/tsage/ringworld/ringworld_logic.h index 286abd38a1..40b202bd7f 100644 --- a/engines/tsage/ringworld/ringworld_logic.h +++ b/engines/tsage/ringworld/ringworld_logic.h @@ -147,15 +147,9 @@ public: #define RING_INVENTORY (*((::TsAGE::Ringworld::RingworldInvObjectList *)_globals->_inventory)) class RingworldGame: public Game { -protected: - virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName); public: virtual void start(); virtual void restart(); - virtual void restartGame(); - virtual void saveGame(); - virtual void restoreGame(); - virtual void quitGame(); virtual void endGame(int resNum, int lineNum); virtual Scene *createScene(int sceneNumber); |