diff options
author | Bastien Bouclet | 2016-07-10 21:20:49 +0200 |
---|---|---|
committer | Bastien Bouclet | 2016-07-10 22:01:03 +0200 |
commit | 504ffd2aba0fcb67216242475cff4bbf54650a96 (patch) | |
tree | 5025a5ef2e8f959615383ad183a121c2a77fdd02 /engines/mohawk/riven.cpp | |
parent | f78bb08b1850b349f28b3cb5f1357fdebd5b8e00 (diff) | |
download | scummvm-rg350-504ffd2aba0fcb67216242475cff4bbf54650a96.tar.gz scummvm-rg350-504ffd2aba0fcb67216242475cff4bbf54650a96.tar.bz2 scummvm-rg350-504ffd2aba0fcb67216242475cff4bbf54650a96.zip |
MOHAWK: Switch Riven saves to a slot based naming scheme
Existing saves are compatible but must be renamed to riven-###.rvn
Diffstat (limited to 'engines/mohawk/riven.cpp')
-rw-r--r-- | engines/mohawk/riven.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 0f764aeded..aa168a38d8 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -176,13 +176,10 @@ Common::Error MohawkEngine_Riven::run() { changeToCard(6); } else if (ConfMan.hasKey("save_slot")) { // Load game from launcher/command line if requested - uint32 gameToLoad = ConfMan.getInt("save_slot"); - Common::StringArray savedGamesList = _saveLoad->generateSaveGameList(); - if (gameToLoad > savedGamesList.size()) - error ("Could not find saved game"); + int gameToLoad = ConfMan.getInt("save_slot"); // Attempt to load the game. On failure, just send us to the main menu. - if (_saveLoad->loadGame(savedGamesList[gameToLoad]).getCode() != Common::kNoError) { + if (_saveLoad->loadGame(gameToLoad).getCode() != Common::kNoError) { changeToStack(kStackAspit); changeToCard(1); } @@ -734,16 +731,11 @@ void MohawkEngine_Riven::runLoadDialog() { } Common::Error MohawkEngine_Riven::loadGameState(int slot) { - return _saveLoad->loadGame(_saveLoad->generateSaveGameList()[slot]); + return _saveLoad->loadGame(slot); } Common::Error MohawkEngine_Riven::saveGameState(int slot, const Common::String &desc) { - Common::StringArray saveList = _saveLoad->generateSaveGameList(); - - if ((uint)slot < saveList.size()) - _saveLoad->deleteSave(saveList[slot]); - - return _saveLoad->saveGame(desc); + return _saveLoad->saveGame(slot, desc); } Common::String MohawkEngine_Riven::getStackName(uint16 stack) const { |