diff options
Diffstat (limited to 'engines/tinsel/saveload.cpp')
-rw-r--r-- | engines/tinsel/saveload.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index 1a6cc1202a..acdaf6c0bb 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -246,16 +246,11 @@ static char *NewName(void) { * Store the file details, ordered by time, in savedFiles[] and return * the number of files found). */ -int getList(void) { - // No change since last call? - // TODO/FIXME: Just always reload this data? Be careful about slow downs!!! - if (!NeedLoad) - return numSfiles; - +int getList(Common::SaveFileManager *saveFileMan, const Common::String &target) { int i; - const Common::String pattern = _vm->getSavegamePattern(); - Common::StringList files = _vm->getSaveFileMan()->listSavefiles(pattern.c_str()); + const Common::String pattern = target + ".???"; + Common::StringList files = saveFileMan->listSavefiles(pattern.c_str()); numSfiles = 0; @@ -264,7 +259,7 @@ int getList(void) { break; const Common::String &fname = *file; - Common::InSaveFile *f = _vm->getSaveFileMan()->openForLoading(fname.c_str()); + Common::InSaveFile *f = saveFileMan->openForLoading(fname.c_str()); if (f == NULL) { continue; } @@ -304,6 +299,15 @@ int getList(void) { return numSfiles; } +int getList(void) { + // No change since last call? + // TODO/FIXME: Just always reload this data? Be careful about slow downs!!! + if (!NeedLoad) + return numSfiles; + + return getList(_vm->getSaveFileMan(), _vm->getTargetName()); +} + char *ListEntry(int i, letype which) { if (i == -1) |