diff options
author | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
commit | 504cf6ecb688a3f1c65a857bffd527d8b0e6ba63 (patch) | |
tree | 0c0d96d4061c11850c851f0fc981c75a58c20515 /engines/sky/detection.cpp | |
parent | d8c28d15ae553d047b7e571f98727fa79ee143f3 (diff) | |
parent | e19922d181e775791f9105b8be7ff410770ede51 (diff) | |
download | scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.gz scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.bz2 scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'engines/sky/detection.cpp')
-rw-r--r-- | engines/sky/detection.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp index 4c7bb2dc17..4b91f50a61 100644 --- a/engines/sky/detection.cpp +++ b/engines/sky/detection.cpp @@ -136,7 +136,7 @@ const ExtraGuiOptions SkyMetaEngine::getExtraGuiOptions(const Common::String &ta } GameDescriptor SkyMetaEngine::findGame(const char *gameid) const { - if (0 == scumm_stricmp(gameid, skySetting.gameid)) + if (0 == scumm_stricmp(gameid, skySetting.gameId)) return skySetting; return GameDescriptor(); } @@ -175,7 +175,7 @@ GameList SkyMetaEngine::detectGames(const Common::FSList &fslist) const { // Match found, add to list of candidates, then abort inner loop. // The game detector uses US English by default. We want British // English to match the recorded voices better. - GameDescriptor dg(skySetting.gameid, skySetting.description, Common::UNK_LANG, Common::kPlatformUnknown); + GameDescriptor dg(skySetting.gameId, skySetting.description, Common::UNK_LANG, Common::kPlatformUnknown); const SkyVersion *sv = skyVersions; while (sv->dinnerTableEntries) { if (dinnerTableEntries == sv->dinnerTableEntries && @@ -222,8 +222,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const { // Find all saves Common::StringArray filenames; - filenames = saveFileMan->listSavefiles("SKY-VM.???"); - sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) + filenames = saveFileMan->listSavefiles("SKY-VM.###"); // Slot 0 is the autosave, if it exists. // TODO: Check for the existence of the autosave -- but this require us @@ -235,16 +234,16 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const { // Extract the extension Common::String ext = file->c_str() + file->size() - 3; ext.toUppercase(); - if (Common::isDigit(ext[0]) && Common::isDigit(ext[1]) && Common::isDigit(ext[2])) { - int slotNum = atoi(ext.c_str()); - Common::InSaveFile *in = saveFileMan->openForLoading(*file); - if (in) { - saveList.push_back(SaveStateDescriptor(slotNum+1, savenames[slotNum])); - delete in; - } + int slotNum = atoi(ext.c_str()); + Common::InSaveFile *in = saveFileMan->openForLoading(*file); + if (in) { + saveList.push_back(SaveStateDescriptor(slotNum+1, savenames[slotNum])); + delete in; } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |