aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-18 15:41:14 +0000
committerJohannes Schickel2008-11-18 15:41:14 +0000
commitbdbae740a60cdf153a1ab082329afa92f56ffd22 (patch)
treef7d1b93d2f00f239c4644dd21c8e6ce13c5b9f1e
parent19aea834115ac70c8b1afde73199086a672620ca (diff)
downloadscummvm-rg350-bdbae740a60cdf153a1ab082329afa92f56ffd22.tar.gz
scummvm-rg350-bdbae740a60cdf153a1ab082329afa92f56ffd22.tar.bz2
scummvm-rg350-bdbae740a60cdf153a1ab082329afa92f56ffd22.zip
Don't rename slots anymore when deleting them via the GMM.
svn-id: r35110
-rw-r--r--engines/kyra/detection.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 73693a880c..6902c03a81 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -1170,35 +1170,8 @@ void KyraMetaEngine::removeSaveState(const char *target, int slot) const {
if (slot == 0)
return;
- Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Common::String filename = Kyra::KyraEngine_v1::getSavegameFilename(target, slot);
-
- saveFileMan->removeSavefile(filename.c_str());
-
- Common::StringList filenames;
- Common::String pattern = target;
- pattern += ".???";
- filenames = saveFileMan->listSavefiles(pattern.c_str());
- Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
-
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
- // Obtain the last 3 digits of the filename, since they correspond to the save slot
- int slotNum = atoi(file->c_str() + file->size() - 3);
-
- // Rename every slot greater than the deleted slot,
- // Also do not rename quicksaves.
- if (slotNum > slot && slotNum < 990) {
- // FIXME: Our savefile renaming done here is inconsitent with what we do in
- // GUI_v2::deleteMenu. While here we rename every slot with a greater equal
- // number of the deleted slot to deleted slot, deleted slot + 1 etc.,
- // we only rename the following slots in GUI_v2::deleteMenu until a slot
- // is missing.
- saveFileMan->renameSavefile(file->c_str(), filename.c_str());
-
- filename = Kyra::KyraEngine_v1::getSavegameFilename(target, ++slot);
- }
- }
-
+ g_system->getSavefileManager()->removeSavefile(filename.c_str());
}
SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int slot) const {