[Scummvm-cvs-logs] SF.net SVN: scummvm:[35110] scummvm/trunk/engines/kyra/detection.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Nov 18 16:41:17 CET 2008
Revision: 35110
http://scummvm.svn.sourceforge.net/scummvm/?rev=35110&view=rev
Author: lordhoto
Date: 2008-11-18 15:41:14 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
Don't rename slots anymore when deleting them via the GMM.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/detection.cpp
Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp 2008-11-18 14:57:40 UTC (rev 35109)
+++ scummvm/trunk/engines/kyra/detection.cpp 2008-11-18 15:41:14 UTC (rev 35110)
@@ -1170,35 +1170,8 @@
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 {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list