aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-18 16:57:57 +0000
committerFilippos Karapetis2008-11-18 16:57:57 +0000
commit2463c550acfff7de77d3cda11cb2e57533c96c71 (patch)
tree9275804ad004644604fc5f27add5e7da855d927f
parent7650b61d27aa848d0f22f59c43d23787c04a65b7 (diff)
downloadscummvm-rg350-2463c550acfff7de77d3cda11cb2e57533c96c71.tar.gz
scummvm-rg350-2463c550acfff7de77d3cda11cb2e57533c96c71.tar.bz2
scummvm-rg350-2463c550acfff7de77d3cda11cb2e57533c96c71.zip
Reverted to old behavior: save games for sword1 can be shared again across all versions (since they're exactly the same) - they're now named sword1.* and no longer named after the game ID
svn-id: r35112
-rw-r--r--engines/sword1/control.cpp10
-rw-r--r--engines/sword1/detection.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 78b09e5c82..f4a4307501 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -720,7 +720,7 @@ bool Control::restoreFromFile(void) {
void Control::readSavegameDescriptions(void) {
char saveName[40];
- Common::String pattern = ConfMan.get("gameid") + ".???";
+ Common::String pattern = "sword1.???";
Common::StringList filenames = _saveFileMan->listSavefiles(pattern.c_str());
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
@@ -770,7 +770,7 @@ int Control::displayMessage(const char *altButton, const char *message, ...) {
}
bool Control::savegamesExist(void) {
- Common::String pattern = ConfMan.get("gameid") + ".???";
+ Common::String pattern = "sword1.???";
Common::StringList saveNames = _saveFileMan->listSavefiles(pattern.c_str());
return saveNames.size() > 0;
}
@@ -975,7 +975,7 @@ void Control::renderVolumeBar(uint8 id, uint8 volL, uint8 volR) {
void Control::saveGameToFile(uint8 slot) {
char fName[15];
uint16 cnt;
- sprintf(fName, "%s.%03d", ConfMan.get("gameid").c_str(), slot);
+ sprintf(fName, "sword1.%03d", slot);
uint16 liveBuf[TOTAL_SECTIONS];
Common::OutSaveFile *outf;
outf = _saveFileMan->openForSaving(fName);
@@ -1037,7 +1037,7 @@ void Control::saveGameToFile(uint8 slot) {
bool Control::restoreGameFromFile(uint8 slot) {
char fName[15];
uint16 cnt;
- sprintf(fName, "%s.%03d", ConfMan.get("gameid").c_str(), slot);
+ sprintf(fName, "sword1.%03d", slot);
Common::InSaveFile *inf;
inf = _saveFileMan->openForLoading(fName);
if (!inf) {
@@ -1110,7 +1110,7 @@ bool Control::convertSaveGame(uint8 slot, char* desc) {
char oldFileName[15];
char newFileName[40];
sprintf(oldFileName, "SAVEGAME.%03d", slot);
- sprintf(newFileName, "%s.%03d", ConfMan.get("gameid").c_str(), slot);
+ sprintf(newFileName, "sword1.%03d", slot);
uint8 *saveData;
int dataSize;
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 741b7d4fba..68f538a3d6 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -233,7 +233,7 @@ void SwordMetaEngine::removeSaveState(const char *target, int slot) const {
SaveStateDescriptor SwordMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
static char fileName[40];
- sprintf(fileName, "%s.%03d", target, slot);
+ sprintf(fileName, "sword1.%03d", slot);
char name[40];
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName);