diff options
Diffstat (limited to 'engines/tinsel/saveload.cpp')
-rw-r--r-- | engines/tinsel/saveload.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index b010ad1fcb..c965666e84 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -106,8 +106,22 @@ enum { #define SAVEGAME_ID (TinselV2 ? (uint32)DW2_SAVEGAME_ID : (uint32)DW1_SAVEGAME_ID) +enum { + // FIXME: Save file names in ScummVM can be longer than 8.3, overflowing the + // name field in savedFiles. Raising it to 256 as a preliminary fix. + FNAMELEN = 256 // 8.3 +}; + +struct SFILES { + char name[FNAMELEN]; + char desc[SG_DESC_LEN + 2]; + TimeDate dateTime; +}; + //----------------- LOCAL GLOBAL DATA -------------------- +// FIXME: Avoid non-const global vars + static int numSfiles = 0; static SFILES savedFiles[MAX_SAVED_FILES]; @@ -275,7 +289,7 @@ static void syncSavedData(Common::Serializer &s, SAVED_DATA &sd) { * Generates a new, unique, filename. */ static char *NewName() { - static char result[FNAMELEN]; + static char result[FNAMELEN]; // FIXME: Avoid non-const global vars int i; int ano = 1; // Allocated number @@ -318,9 +332,9 @@ static int cmpTimeDate(const TimeDate &a, const TimeDate &b) { } /** - * Interrogate the current DOS directory for saved game files. + * Compute a list of all available saved game files. * Store the file details, ordered by time, in savedFiles[] and return - * the number of files found). + * the number of files found. */ int getList(Common::SaveFileManager *saveFileMan, const Common::String &target) { // No change since last call? |