From 720c974fafaca16b6e86f28ffc14c8c3aa574e15 Mon Sep 17 00:00:00 2001 From: David Corrales Date: Thu, 12 Jul 2007 17:58:15 +0000 Subject: Changed SaveFileManager::listSavegames() function to be engine agnostic. It now returns a list will the full paths of existing files that match a given regex. Additionally, modified the 5 engines which use the default manager (Agos, Queen, Saga, Scumm and Touche) to parse the filename list and mark the available saves bool array correctly. svn-id: r28046 --- common/savefile.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/savefile.h b/common/savefile.h index 612d6ae210..fec6fc697b 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -30,6 +30,7 @@ #include "common/noncopyable.h" #include "common/scummsys.h" #include "common/stream.h" +#include "common/str.h" namespace Common { @@ -94,12 +95,11 @@ public: virtual InSaveFile *openForLoading(const char *filename) = 0; /** - * Request a list of available savegames with a given prefix. - * TODO: Document this better! - * TODO: Or even replace it with a better API. For example, one that - * returns a list of strings for all present file names. + * Request a list of available savegames with a given regex. + * @param regex Regular expression to match. Wildcards like * or ? are available. + * returns a list of strings for all present file names. */ - virtual void listSavefiles(const char *prefix , bool *marks, int num) = 0; + virtual Common::StringList listSavefiles(const char *regex) = 0; /** * Get the path to the save game directory. -- cgit v1.2.3