diff options
-rw-r--r-- | engines/agi/detection.cpp | 2 | ||||
-rw-r--r-- | engines/agos/detection.cpp | 2 | ||||
-rw-r--r-- | engines/cine/detection.cpp | 2 | ||||
-rw-r--r-- | engines/game.h | 15 | ||||
-rw-r--r-- | engines/kyra/detection.cpp | 4 | ||||
-rw-r--r-- | engines/lure/detection.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/detection.cpp | 2 | ||||
-rw-r--r-- | engines/queen/queen.cpp | 2 | ||||
-rw-r--r-- | engines/saga/detection.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/detection.cpp | 4 | ||||
-rw-r--r-- | engines/sky/sky.cpp | 4 | ||||
-rw-r--r-- | engines/sword1/sword1.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/detection.cpp | 4 | ||||
-rw-r--r-- | engines/touche/detection.cpp | 4 |
15 files changed, 21 insertions, 32 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 1f3ba18bc4..880b8586e3 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2184,7 +2184,7 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const { uint32 type = in->readUint32BE(); if (type == AGIflag) in->read(saveDesc, 31); - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 6a022ac44a..b00267368f 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -182,7 +182,7 @@ SaveStateList AgosMetaEngine::listSaves(const char *target) const { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { saveDesc = file->c_str(); - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp index 156cbaa805..ca47e5028b 100644 --- a/engines/cine/detection.cpp +++ b/engines/cine/detection.cpp @@ -590,7 +590,7 @@ SaveStateList CineMetaEngine::listSaves(const char *target) const { } } while (ch >= 32 && !in->eos()); if (saveDesc[0] != 0) { - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); file++; } } while (!in->eos()); diff --git a/engines/game.h b/engines/game.h index 1334453131..9a8c25e35b 100644 --- a/engines/game.h +++ b/engines/game.h @@ -102,7 +102,7 @@ public: /** * A hashmap describing details about a given save state. * TODO - * Guaranteed to contain save_slot, filename and description values. + * Guaranteed to contain save_slot and description values. * Additional ideas: Playtime, creation date, thumbnail, ... */ class SaveStateDescriptor : public Common::StringMap { @@ -113,21 +113,18 @@ public: SaveStateDescriptor() : _thumbnail() { setVal("save_slot", "-1"); // FIXME: default to 0 (first slot) or to -1 (invalid slot) ? setVal("description", ""); - setVal("filename", ""); } - SaveStateDescriptor(int s, const Common::String &d, const Common::String &f) : _thumbnail() { + SaveStateDescriptor(int s, const Common::String &d) : _thumbnail() { char buf[16]; sprintf(buf, "%d", s); setVal("save_slot", buf); setVal("description", d); - setVal("filename", f); } - SaveStateDescriptor(const Common::String &s, const Common::String &d, const Common::String &f) : _thumbnail() { + SaveStateDescriptor(const Common::String &s, const Common::String &d) : _thumbnail() { setVal("save_slot", s); setVal("description", d); - setVal("filename", f); } /** The saveslot id, as it would be passed to the "-x" command line switch. */ @@ -142,12 +139,6 @@ public: /** A human readable description of the save state (read-only variant). */ const Common::String &description() const { return getVal("description"); } - /** The filename of the savestate, for use with the SaveFileManager API. */ - Common::String &filename() { return getVal("filename"); } - - /** The filename of the savestate, for use with the SaveFileManager API (read-only variant). */ - const Common::String &filename() const { return getVal("filename"); } - /** Optional entries only included when querying via MetaEngine::querySaveMetaInfo */ /** diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 0d4f8244ac..d584623702 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -1151,7 +1151,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const { if (slotNum == 0 && header.gameID == Kyra::GI_KYRA3) header.description = "New Game"; - saveList.push_back(SaveStateDescriptor(slotNum, header.description, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, header.description)); } delete in; } @@ -1209,7 +1209,7 @@ SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int s delete in; if (error == Kyra::KyraEngine_v1::kRSHENoError) { - SaveStateDescriptor desc(slot, header.description, filename); + SaveStateDescriptor desc(slot, header.description); desc.setDeletableFlag(slot != 0); desc.setThumbnail(header.thumbnail); diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp index 7c0715e694..863cb7fec0 100644 --- a/engines/lure/detection.cpp +++ b/engines/lure/detection.cpp @@ -230,7 +230,7 @@ SaveStateList LureMetaEngine::listSaves(const char *target) const { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { saveDesc = Lure::getSaveName(in); - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp index d64f50b620..626aba6569 100644 --- a/engines/parallaction/detection.cpp +++ b/engines/parallaction/detection.cpp @@ -299,7 +299,7 @@ SaveStateList ParallactionMetaEngine::listSaves(const char *target) const { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { Common::String saveDesc = in->readLine(); - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index 961154e5ac..8740497587 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -155,7 +155,7 @@ SaveStateList QueenMetaEngine::listSaves(const char *target) const { for (int i = 0; i < 4; i++) in->readUint32BE(); in->read(saveDesc, 32); - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 3f67d4dc70..d5f3659dd4 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -197,7 +197,7 @@ SaveStateList SagaMetaEngine::listSaves(const char *target) const { for (int i = 0; i < 3; i++) in->readUint32BE(); in->read(saveDesc, SAVE_TITLE_SIZE); - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 31f957e6b1..297e0b8efd 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -978,7 +978,7 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { Scumm::getSavegameName(in, saveDesc, 0); // FIXME: heversion?!? - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } @@ -1006,7 +1006,7 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int // TODO: Cleanup Graphics::Surface *thumbnail = ScummEngine::loadThumbnailFromSlot(target, slot); - SaveStateDescriptor desc(slot, saveDesc, filename); + SaveStateDescriptor desc(slot, saveDesc); desc.setDeletableFlag(true); desc.setThumbnail(thumbnail); diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 605d7b6e04..8250766f1a 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -239,7 +239,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const { // Slot 0 is the autosave, if it exists. // TODO: Check for the existence of the autosave -- but this require us // to know which SKY variant we are looking at. - saveList.insert_at(0, SaveStateDescriptor(0, "*AUTOSAVE*", "")); + saveList.insert_at(0, SaveStateDescriptor(0, "*AUTOSAVE*")); // Prepare the list of savestates by looping over all matching savefiles for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) { @@ -250,7 +250,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const { int slotNum = atoi(ext.c_str()); Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { - saveList.push_back(SaveStateDescriptor(slotNum+1, savenames[slotNum], *file)); + saveList.push_back(SaveStateDescriptor(slotNum+1, savenames[slotNum])); delete in; } } diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 6e5420787b..982b6cf6e4 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -259,7 +259,7 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const { // FIXME: The in-game dialog shows the first save slot as 1, not 0, // but if we change the numbering here, the launcher won̈́t set // "save_slot" correctly. - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); file++; } } diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index eba8edaf91..23751ea3ef 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -192,7 +192,7 @@ SaveStateList Sword2MetaEngine::listSaves(const char *target) const { if (in) { in->readUint32LE(); in->read(saveDesc, SAVE_DESCRIPTION_LEN); - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 526d72e4a4..a52a6c9c1e 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -359,9 +359,7 @@ SaveStateList TinselMetaEngine::listSaves(const char *target) const { SaveStateList saveList; for (int i = 0; i < numStates; i++) { - SaveStateDescriptor sd(i, - Tinsel::ListEntry(i, Tinsel::LE_DESC), - Tinsel::ListEntry(i, Tinsel::LE_NAME)); + SaveStateDescriptor sd(i, Tinsel::ListEntry(i, Tinsel::LE_DESC)); // TODO: Also add savedFiles[i].dateTime to the SaveStateDescriptor saveList.push_back(sd); } diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp index fae051ad30..2b9f3b49fa 100644 --- a/engines/touche/detection.cpp +++ b/engines/touche/detection.cpp @@ -184,7 +184,7 @@ SaveStateList ToucheMetaEngine::listSaves(const char *target) const { in->readUint16LE(); in->readUint16LE(); in->read(saveDesc, Touche::kGameStateDescriptionLen); - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } @@ -205,7 +205,7 @@ SaveStateList ToucheMetaEngine::listSaves(const char *target) const { in->readUint16LE(); in->readUint16LE(); in->read(saveDesc, Touche::kGameStateDescriptionLen); - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); + saveList.push_back(SaveStateDescriptor(slotNum, saveDesc)); delete in; } } |