diff options
author | Filippos Karapetis | 2012-06-13 11:29:14 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-06-13 12:26:53 +0300 |
commit | 5a17ea058583fb0a3d00392b8e07b2a1f414fded (patch) | |
tree | 9b3cd005ada1ee279780fdf9c3d344b641247b8d /engines/sci/console.cpp | |
parent | a209359a678ea19935c875da96fbdb1015bcee74 (diff) | |
download | scummvm-rg350-5a17ea058583fb0a3d00392b8e07b2a1f414fded.tar.gz scummvm-rg350-5a17ea058583fb0a3d00392b8e07b2a1f414fded.tar.bz2 scummvm-rg350-5a17ea058583fb0a3d00392b8e07b2a1f414fded.zip |
SCI: Move all file-related functions in file.*
This way, there is a clear separation of the actual SCI kernel file
functions and the file classes and wrappers of ScummVM
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r-- | engines/sci/console.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 5b5301b468..6a44972a4b 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1216,6 +1216,27 @@ bool Console::cmdRestartGame(int argc, const char **argv) { return Cmd_Exit(0, 0); } +// The scripts get IDs ranging from 100->199, because the scripts require us to assign unique ids THAT EVEN STAY BETWEEN +// SAVES and the scripts also use "saves-count + 1" to create a new savedgame slot. +// SCI1.1 actually recycles ids, in that case we will currently get "0". +// This behavior is required especially for LSL6. In this game, it's possible to quick save. The scripts will use +// the last-used id for that feature. If we don't assign sticky ids, the feature will overwrite different saves all the +// time. And sadly we can't just use the actual filename ids directly, because of the creation method for new slots. + +extern void listSavegames(Common::Array<SavegameDesc> &saves); + +bool Console::cmdListSaves(int argc, const char **argv) { + Common::Array<SavegameDesc> saves; + listSavegames(saves); + + for (uint i = 0; i < saves.size(); i++) { + Common::String filename = g_sci->getSavegameName(saves[i].id); + DebugPrintf("%s: '%s'\n", filename.c_str(), saves[i].name); + } + + return true; +} + bool Console::cmdClassTable(int argc, const char **argv) { DebugPrintf("Available classes (parse a parameter to filter the table by a specific class):\n"); |