[Scummvm-cvs-logs] SF.net SVN: scummvm:[34905] scummvm/trunk/engines
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Nov 5 16:41:12 CET 2008
Revision: 34905
http://scummvm.svn.sourceforge.net/scummvm/?rev=34905&view=rev
Author: fingolfin
Date: 2008-11-05 15:41:12 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Got rid of the unused 'filename' attribute in SaveStateDescriptor
Modified Paths:
--------------
scummvm/trunk/engines/agi/detection.cpp
scummvm/trunk/engines/agos/detection.cpp
scummvm/trunk/engines/cine/detection.cpp
scummvm/trunk/engines/game.h
scummvm/trunk/engines/kyra/detection.cpp
scummvm/trunk/engines/lure/detection.cpp
scummvm/trunk/engines/parallaction/detection.cpp
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/saga/detection.cpp
scummvm/trunk/engines/scumm/detection.cpp
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/tinsel/detection.cpp
scummvm/trunk/engines/touche/detection.cpp
Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/agi/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -2184,7 +2184,7 @@
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;
}
}
Modified: scummvm/trunk/engines/agos/detection.cpp
===================================================================
--- scummvm/trunk/engines/agos/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/agos/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -182,7 +182,7 @@
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;
}
}
Modified: scummvm/trunk/engines/cine/detection.cpp
===================================================================
--- scummvm/trunk/engines/cine/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/cine/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -590,7 +590,7 @@
}
} 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());
Modified: scummvm/trunk/engines/game.h
===================================================================
--- scummvm/trunk/engines/game.h 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/game.h 2008-11-05 15:41:12 UTC (rev 34905)
@@ -102,7 +102,7 @@
/**
* 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 @@
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 @@
/** 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 */
/**
Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/kyra/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -1151,7 +1151,7 @@
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 @@
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);
Modified: scummvm/trunk/engines/lure/detection.cpp
===================================================================
--- scummvm/trunk/engines/lure/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/lure/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -230,7 +230,7 @@
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;
}
}
Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/parallaction/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -299,7 +299,7 @@
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;
}
}
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/queen/queen.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -155,7 +155,7 @@
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;
}
}
Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/saga/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -197,7 +197,7 @@
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;
}
}
Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/scumm/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -978,7 +978,7 @@
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 @@
// TODO: Cleanup
Graphics::Surface *thumbnail = ScummEngine::loadThumbnailFromSlot(target, slot);
- SaveStateDescriptor desc(slot, saveDesc, filename);
+ SaveStateDescriptor desc(slot, saveDesc);
desc.setDeletableFlag(true);
desc.setThumbnail(thumbnail);
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/sky/sky.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -239,7 +239,7 @@
// 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 @@
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;
}
}
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -259,7 +259,7 @@
// 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++;
}
}
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -192,7 +192,7 @@
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;
}
}
Modified: scummvm/trunk/engines/tinsel/detection.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/tinsel/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -359,9 +359,7 @@
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);
}
Modified: scummvm/trunk/engines/touche/detection.cpp
===================================================================
--- scummvm/trunk/engines/touche/detection.cpp 2008-11-05 14:58:47 UTC (rev 34904)
+++ scummvm/trunk/engines/touche/detection.cpp 2008-11-05 15:41:12 UTC (rev 34905)
@@ -184,7 +184,7 @@
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 @@
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;
}
}
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