aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/detection.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-09 16:13:34 +0000
committerFilippos Karapetis2008-11-09 16:13:34 +0000
commitf5729a4a8b1b30c66cf3a9553ffb0002c8d7b158 (patch)
treeea7abac525899eacaf581c4107353eb284d863de /engines/saga/detection.cpp
parent08eecfd3e55a7a52f523ce3ead18e0e846d7ab2f (diff)
downloadscummvm-rg350-f5729a4a8b1b30c66cf3a9553ffb0002c8d7b158.tar.gz
scummvm-rg350-f5729a4a8b1b30c66cf3a9553ffb0002c8d7b158.tar.bz2
scummvm-rg350-f5729a4a8b1b30c66cf3a9553ffb0002c8d7b158.zip
- The GMM save dialog is now working for all engines which support the appropriate features
- Added a new method to the MetaEngine class, getMaximumSaveSlot(), and implemented it in all engines for which the listSavefiles() method is implemented (it goes together with the listSavefiles method). It is used to fill the unused save slots in the save/load dialogs of each engine, so that the user can create new save games in empty slots - Unified the save/load dialog list numbering in the GMM load/save screens and in the load screen of the main menu (before a game is started) svn-id: r34963
Diffstat (limited to 'engines/saga/detection.cpp')
-rw-r--r--engines/saga/detection.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index b7503278e7..f114fa31b7 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -151,6 +151,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
virtual void removeSaveState(const char *target, int slot) const;
};
@@ -200,23 +201,15 @@ SaveStateList SagaMetaEngine::listSaves(const char *target) const {
in->read(saveDesc, SAVE_TITLE_SIZE);
saveList.push_back(SaveStateDescriptor(slotNum, saveDesc));
delete in;
- } else {
- // handle gaps
- *saveDesc = 0;
- saveList.push_back(SaveStateDescriptor(slotNum, saveDesc));
}
}
}
- // Fill the rest of the list with empty slots
- *saveDesc = 0;
- for (int i = slotNum + 1; i <= 99; i++) {
- saveList.push_back(SaveStateDescriptor(i, saveDesc));
- }
-
return saveList;
}
+int SagaMetaEngine::getMaximumSaveSlot() const { return 99; }
+
void SagaMetaEngine::removeSaveState(const char *target, int slot) const {
char extension[6];
snprintf(extension, sizeof(extension), ".s%02d", slot);