diff options
author | Johannes Schickel | 2012-06-10 05:04:59 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-06-10 05:04:59 +0200 |
commit | 49fafb48a7f089c97ed3baa9aefe65ec56dce682 (patch) | |
tree | 1e9ce4431017539cc4ecf519869f29cd394bd3f9 /engines/sci | |
parent | 7c5cf1b400808865a5f601f70d624ad6704a0c8c (diff) | |
download | scummvm-rg350-49fafb48a7f089c97ed3baa9aefe65ec56dce682.tar.gz scummvm-rg350-49fafb48a7f089c97ed3baa9aefe65ec56dce682.tar.bz2 scummvm-rg350-49fafb48a7f089c97ed3baa9aefe65ec56dce682.zip |
GUI: Refactor default savegame description creation.
Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP.
Now I added a method to SaveLoadChooser instead, which takes care of this. This
might not be the best placement of such a functionality, thus I added a TODO
which talks about moving it to a better place.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 4af71f41af..42f8b8832c 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -567,15 +567,7 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { game_description = dialog->getResultString(); if (game_description.empty()) { // create our own description for the saved game, the user didnt enter it - #if defined(USE_SAVEGAME_TIMESTAMP) - TimeDate curTime; - g_system->getTimeAndDate(curTime); - curTime.tm_year += 1900; // fixup year - curTime.tm_mon++; // fixup month - game_description = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); - #else - game_description = Common::String::format("Save %d", savegameId + 1); - #endif + game_description = dialog->createDefaultSaveDescription(savegameId); } delete dialog; g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save) |