[Scummvm-cvs-logs] SF.net SVN: scummvm:[48287] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Mar 18 16:54:40 CET 2010
Revision: 48287
http://scummvm.svn.sourceforge.net/scummvm/?rev=48287&view=rev
Author: fingolfin
Date: 2010-03-18 15:54:40 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
COMMON: Get rid of Common::StringList
Modified Paths:
--------------
scummvm/trunk/common/str-array.h
scummvm/trunk/engines/agi/detection.cpp
scummvm/trunk/engines/agi/sound.cpp
scummvm/trunk/engines/agos/detection.cpp
scummvm/trunk/engines/agos/saveload.cpp
scummvm/trunk/engines/cine/cine.h
scummvm/trunk/engines/cine/detection.cpp
scummvm/trunk/engines/cine/gfx.cpp
scummvm/trunk/engines/cine/gfx.h
scummvm/trunk/engines/cine/msg.cpp
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/cruise/cruise.h
scummvm/trunk/engines/cruise/detection.cpp
scummvm/trunk/engines/draci/detection.cpp
scummvm/trunk/engines/groovie/saveload.cpp
scummvm/trunk/engines/kyra/detection.cpp
scummvm/trunk/engines/kyra/gui.cpp
scummvm/trunk/engines/lure/detection.cpp
scummvm/trunk/engines/mohawk/console.cpp
scummvm/trunk/engines/mohawk/detection.cpp
scummvm/trunk/engines/mohawk/myst.cpp
scummvm/trunk/engines/mohawk/myst_saveload.cpp
scummvm/trunk/engines/mohawk/myst_saveload.h
scummvm/trunk/engines/mohawk/riven.cpp
scummvm/trunk/engines/mohawk/riven_saveload.cpp
scummvm/trunk/engines/mohawk/riven_saveload.h
scummvm/trunk/engines/parallaction/detection.cpp
scummvm/trunk/engines/parallaction/parallaction_ns.cpp
scummvm/trunk/engines/parallaction/saveload.cpp
scummvm/trunk/engines/parallaction/saveload.h
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/queen/resource.cpp
scummvm/trunk/engines/saga/detection.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/saga/saveload.cpp
scummvm/trunk/engines/sci/detection.cpp
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/engine/kernel32.cpp
scummvm/trunk/engines/sci/engine/kfile.cpp
scummvm/trunk/engines/sci/engine/static_selectors.cpp
scummvm/trunk/engines/scumm/detection.cpp
scummvm/trunk/engines/scumm/saveload.cpp
scummvm/trunk/engines/sky/control.cpp
scummvm/trunk/engines/sky/detection.cpp
scummvm/trunk/engines/sword1/control.cpp
scummvm/trunk/engines/sword1/detection.cpp
scummvm/trunk/engines/sword2/saveload.cpp
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/teenagent/detection.cpp
scummvm/trunk/engines/tinsel/detection.cpp
scummvm/trunk/engines/tinsel/saveload.cpp
scummvm/trunk/engines/touche/detection.cpp
scummvm/trunk/engines/touche/menu.cpp
scummvm/trunk/engines/tucker/detection.cpp
Modified: scummvm/trunk/common/str-array.h
===================================================================
--- scummvm/trunk/common/str-array.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/common/str-array.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -37,13 +37,6 @@
typedef Array<String> StringArray;
-/**
- * Alias for type StringArray. For backwards compatibility only.
- * @deprecated Use StringArray instead!
- */
-typedef StringArray StringList;
-
-
} // End of namespace Common
#endif
Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/agi/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -1048,7 +1048,7 @@
SaveStateList AgiMetaEngine::listSaves(const char *target) const {
const uint32 AGIflag = MKID_BE('AGI:');
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
char saveDesc[31];
Common::String pattern = target;
pattern += ".???";
@@ -1057,7 +1057,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::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);
Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/agi/sound.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -1194,16 +1194,16 @@
*/
struct fsnodeNameEqualsIgnoreCase : public Common::UnaryFunction<const Common::FSNode&, bool> {
// FIXME: This should be replaced; use SearchMan instead
- fsnodeNameEqualsIgnoreCase(const Common::StringList &str) : _str(str) {}
+ fsnodeNameEqualsIgnoreCase(const Common::StringArray &str) : _str(str) {}
fsnodeNameEqualsIgnoreCase(const Common::String str) { _str.push_back(str); }
bool operator()(const Common::FSNode ¶m) const {
- for (Common::StringList::const_iterator iter = _str.begin(); iter != _str.end(); ++iter)
+ for (Common::StringArray::const_iterator iter = _str.begin(); iter != _str.end(); ++iter)
if (param.getName().equalsIgnoreCase(*iter))
return true;
return false;
}
private:
- Common::StringList _str;
+ Common::StringArray _str;
};
bool SoundMgr::loadInstruments() {
@@ -1229,12 +1229,12 @@
}
// Populate executable filenames list (Long filename and short filename) for searching
- Common::StringList exeNames;
+ Common::StringArray exeNames;
exeNames.push_back(Common::String(exeInfo->exePrefix) + ".SYS16");
exeNames.push_back(Common::String(exeInfo->exePrefix) + ".SYS");
// Populate wave filenames list (Long filename and short filename) for searching
- Common::StringList waveNames;
+ Common::StringArray waveNames;
waveNames.push_back("SIERRASTANDARD");
waveNames.push_back("SIERRAST");
Modified: scummvm/trunk/engines/agos/detection.cpp
===================================================================
--- scummvm/trunk/engines/agos/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/agos/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -185,7 +185,7 @@
SaveStateList AgosMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String saveDesc;
Common::String pattern = target;
pattern += ".???";
@@ -194,7 +194,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::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);
Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/agos/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -37,7 +37,7 @@
int AGOSEngine::countSaveGames() {
Common::InSaveFile *f;
- Common::StringList filenames;
+ Common::StringArray filenames;
uint i = 1;
char slot[4];
int slotNum;
@@ -49,7 +49,7 @@
memset(marks, false, 256 * sizeof(bool)); //assume no savegames for this title
filenames = _saveFileMan->listSavefiles(prefix);
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file){
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file){
//Obtain the last 3 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-3];
slot[1] = file->c_str()[file->size()-2];
Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cine/cine.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -130,7 +130,7 @@
Common::RandomSource _rnd;
- Common::StringList _volumeResourceFiles;
+ Common::StringArray _volumeResourceFiles;
StringPtrHashMap _volumeEntriesMap;
TextHandler _textHandler;
Modified: scummvm/trunk/engines/cine/detection.cpp
===================================================================
--- scummvm/trunk/engines/cine/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cine/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -619,9 +619,9 @@
Common::String pattern = target;
pattern += ".?";
- Common::StringList filenames = saveFileMan->listSavefiles(pattern);
+ Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end());
- Common::StringList::const_iterator file;
+ Common::StringArray::const_iterator file;
Common::String filename = target;
filename += ".dir";
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cine/gfx.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -833,7 +833,7 @@
delete menu;
}
-SelectionMenu::SelectionMenu(Common::Point p, int width, Common::StringList elements)
+SelectionMenu::SelectionMenu(Common::Point p, int width, Common::StringArray elements)
: Menu(kSelectionMenu), _pos(p), _width(width), _elements(elements), _selection(-1) {
}
Modified: scummvm/trunk/engines/cine/gfx.h
===================================================================
--- scummvm/trunk/engines/cine/gfx.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cine/gfx.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -84,7 +84,7 @@
class SelectionMenu : public Menu {
public:
- SelectionMenu(Common::Point p, int width, Common::StringList elements);
+ SelectionMenu(Common::Point p, int width, Common::StringArray elements);
int getElementCount() const { return _elements.size(); }
@@ -94,7 +94,7 @@
private:
const Common::Point _pos;
const int _width;
- const Common::StringList _elements;
+ const Common::StringArray _elements;
int _selection;
};
Modified: scummvm/trunk/engines/cine/msg.cpp
===================================================================
--- scummvm/trunk/engines/cine/msg.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cine/msg.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -33,7 +33,7 @@
// FIXME: Global C++ objects affect portability negatively.
// Turn this into a class member instead.
-Common::StringList messageTable;
+Common::StringArray messageTable;
void loadMsg(char *pMsgName) {
uint32 sourceSize;
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cine/various.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -502,7 +502,7 @@
if (!listSize)
return;
- Common::StringList list;
+ Common::StringArray list;
for (int i = 0; i < listSize; ++i)
list.push_back(objectListCommand[i]);
SelectionMenu *menu = new SelectionMenu(Common::Point(x, y), menuWidth, list);
@@ -706,7 +706,7 @@
Y = 199 - paramY;
}
- Common::StringList list;
+ Common::StringArray list;
for (uint16 i = 0; i < height; ++i)
list.push_back(commandList[i]);
menu = new SelectionMenu(Common::Point(X, Y), width, list);
Modified: scummvm/trunk/engines/cruise/cruise.h
===================================================================
--- scummvm/trunk/engines/cruise/cruise.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cruise/cruise.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -66,7 +66,7 @@
bool _preLoad;
Debugger *_debugger;
PCSound *_sound;
- Common::StringList _langStrings;
+ Common::StringArray _langStrings;
CursorType _savedCursor;
uint32 lastTick, lastTickDebug;
int _gameSpeed;
Modified: scummvm/trunk/engines/cruise/detection.cpp
===================================================================
--- scummvm/trunk/engines/cruise/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/cruise/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -271,14 +271,14 @@
SaveStateList CruiseMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String pattern("cruise.s??");
filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 2);
Modified: scummvm/trunk/engines/draci/detection.cpp
===================================================================
--- scummvm/trunk/engines/draci/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/draci/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -130,14 +130,14 @@
SaveStateList DraciMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String pattern("draci.s??");
filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 2);
Modified: scummvm/trunk/engines/groovie/saveload.cpp
===================================================================
--- scummvm/trunk/engines/groovie/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/groovie/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -50,13 +50,13 @@
// Get the list of savefiles
Common::String pattern = target + ".00?";
- Common::StringList savefiles = g_system->getSavefileManager()->listSavefiles(pattern);
+ Common::StringArray savefiles = g_system->getSavefileManager()->listSavefiles(pattern);
// Sort the list of filenames
sort(savefiles.begin(), savefiles.end());
// Fill the information for the existing savegames
- Common::StringList::iterator it = savefiles.begin();
+ Common::StringArray::iterator it = savefiles.begin();
while (it != savefiles.end()) {
int slot = it->lastChar() - '0';
SaveStateDescriptor descriptor;
Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/kyra/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -1321,12 +1321,12 @@
Common::String pattern = target;
pattern += ".???";
- Common::StringList filenames;
+ Common::StringArray filenames;
filenames = saveFileMan->listSavefiles(pattern);
Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::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);
Modified: scummvm/trunk/engines/kyra/gui.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/kyra/gui.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -370,10 +370,10 @@
void GUI::updateSaveList(bool excludeQuickSaves) {
Common::String pattern = _vm->_targetName + ".???";
- Common::StringList saveFileList = _vm->_saveFileMan->listSavefiles(pattern);
+ Common::StringArray saveFileList = _vm->_saveFileMan->listSavefiles(pattern);
_saveSlots.clear();
- for (Common::StringList::const_iterator i = saveFileList.begin(); i != saveFileList.end(); ++i) {
+ for (Common::StringArray::const_iterator i = saveFileList.begin(); i != saveFileList.end(); ++i) {
char s1 = 0, s2 = 0, s3 = 0;
s1 = (*i)[i->size()-3];
s2 = (*i)[i->size()-2];
Modified: scummvm/trunk/engines/lure/detection.cpp
===================================================================
--- scummvm/trunk/engines/lure/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/lure/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -242,7 +242,7 @@
SaveStateList LureMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String saveDesc;
Common::String pattern = "lure.???";
@@ -250,7 +250,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::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);
Modified: scummvm/trunk/engines/mohawk/console.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/console.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/console.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -510,7 +510,7 @@
// Load in Variable Names
Common::SeekableReadStream *nameStream = _vm->getRawData(ID_NAME, VariableNames);
- Common::StringList varNames;
+ Common::StringArray varNames;
uint16 namesCount = nameStream->readUint16BE();
uint16 *stringOffsets = new uint16[namesCount];
@@ -531,7 +531,7 @@
// Load in External Command Names
nameStream = _vm->getRawData(ID_NAME, ExternalCommandNames);
- Common::StringList xNames;
+ Common::StringArray xNames;
namesCount = nameStream->readUint16BE();
stringOffsets = new uint16[namesCount];
Modified: scummvm/trunk/engines/mohawk/detection.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -1005,7 +1005,7 @@
}
SaveStateList MohawkMetaEngine::listSaves(const char *target) const {
- Common::StringList filenames;
+ Common::StringArray filenames;
SaveStateList saveList;
// Loading games is only supported in Myst/Riven currently.
@@ -1027,10 +1027,10 @@
void MohawkMetaEngine::removeSaveState(const char *target, int slot) const {
// Removing saved games is only supported in Myst/Riven currently.
if (strstr(target, "myst")) {
- Common::StringList filenames = g_system->getSavefileManager()->listSavefiles("*.mys");
+ Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles("*.mys");
g_system->getSavefileManager()->removeSavefile(filenames[slot].c_str());
} else if (strstr(target, "riven")) {
- Common::StringList filenames = g_system->getSavefileManager()->listSavefiles("*.rvn");
+ Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles("*.rvn");
g_system->getSavefileManager()->removeSavefile(filenames[slot].c_str());
}
}
Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/myst.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -222,7 +222,7 @@
// Load game from launcher/command line if requested
if (ConfMan.hasKey("save_slot") && !(getFeatures() & GF_DEMO)) {
uint32 gameToLoad = ConfMan.getInt("save_slot");
- Common::StringList savedGamesList = _saveLoad->generateSaveGameList();
+ Common::StringArray savedGamesList = _saveLoad->generateSaveGameList();
if (gameToLoad > savedGamesList.size())
error ("Could not find saved game");
_saveLoad->loadGame(savedGamesList[gameToLoad]);
@@ -1593,7 +1593,7 @@
}
Common::Error MohawkEngine_Myst::saveGameState(int slot, const char *desc) {
- Common::StringList saveList = _saveLoad->generateSaveGameList();
+ Common::StringArray saveList = _saveLoad->generateSaveGameList();
if ((uint)slot < saveList.size())
_saveLoad->deleteSave(saveList[slot]);
Modified: scummvm/trunk/engines/mohawk/myst_saveload.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst_saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/myst_saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -39,7 +39,7 @@
delete _v;
}
-Common::StringList MystSaveLoad::generateSaveGameList() {
+Common::StringArray MystSaveLoad::generateSaveGameList() {
return _saveFileMan->listSavefiles("*.mys");
}
Modified: scummvm/trunk/engines/mohawk/myst_saveload.h
===================================================================
--- scummvm/trunk/engines/mohawk/myst_saveload.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/myst_saveload.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -194,7 +194,7 @@
MystSaveLoad(MohawkEngine_Myst*, Common::SaveFileManager*);
~MystSaveLoad();
- Common::StringList generateSaveGameList();
+ Common::StringArray generateSaveGameList();
bool loadGame(Common::String);
bool saveGame(Common::String);
void deleteSave(Common::String);
Modified: scummvm/trunk/engines/mohawk/riven.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/riven.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -98,7 +98,7 @@
// Load game from launcher/command line if requested
if (ConfMan.hasKey("save_slot") && !(getFeatures() & GF_DEMO)) {
uint32 gameToLoad = ConfMan.getInt("save_slot");
- Common::StringList savedGamesList = _saveLoad->generateSaveGameList();
+ Common::StringArray savedGamesList = _saveLoad->generateSaveGameList();
if (gameToLoad > savedGamesList.size())
error ("Could not find saved game");
_saveLoad->loadGame(savedGamesList[gameToLoad]);
@@ -569,7 +569,7 @@
}
Common::Error MohawkEngine_Riven::saveGameState(int slot, const char *desc) {
- Common::StringList saveList = _saveLoad->generateSaveGameList();
+ Common::StringArray saveList = _saveLoad->generateSaveGameList();
if ((uint)slot < saveList.size())
_saveLoad->deleteSave(saveList[slot]);
Modified: scummvm/trunk/engines/mohawk/riven_saveload.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/riven_saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -38,7 +38,7 @@
delete _loadFile;
}
-Common::StringList RivenSaveLoad::generateSaveGameList() {
+Common::StringArray RivenSaveLoad::generateSaveGameList() {
return _saveFileMan->listSavefiles("*.rvn");
}
Modified: scummvm/trunk/engines/mohawk/riven_saveload.h
===================================================================
--- scummvm/trunk/engines/mohawk/riven_saveload.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/mohawk/riven_saveload.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -45,7 +45,7 @@
RivenSaveLoad(MohawkEngine_Riven*, Common::SaveFileManager*);
~RivenSaveLoad();
- Common::StringList generateSaveGameList();
+ Common::StringArray generateSaveGameList();
bool loadGame(Common::String);
bool saveGame(Common::String);
void deleteSave(Common::String);
Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/parallaction/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -295,7 +295,7 @@
SaveStateList ParallactionMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String pattern = target;
pattern += ".0??";
@@ -303,7 +303,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 2);
Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -116,7 +116,7 @@
_hasSlide = false;
_hasCharacter = false;
- Common::StringList list;
+ Common::StringArray list;
char *tok = strtok(_buf, ".");
while (tok) {
list.push_back(tok);
Modified: scummvm/trunk/engines/parallaction/saveload.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/parallaction/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -193,9 +193,9 @@
-int SaveLoad::buildSaveFileList(Common::StringList& l) {
+int SaveLoad::buildSaveFileList(Common::StringArray& l) {
Common::String pattern = _saveFilePrefix + ".???";
- Common::StringList filenames = _saveFileMan->listSavefiles(pattern);
+ Common::StringArray filenames = _saveFileMan->listSavefiles(pattern);
Common::String s;
@@ -219,7 +219,7 @@
int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const Common::String &caption, const Common::String &button) {
- Common::StringList list;
+ Common::StringArray list;
buildSaveFileList(list);
GUI::SaveLoadChooser slc(caption, button);
@@ -332,7 +332,7 @@
}
void SaveLoad_ns::renameOldSavefiles() {
- Common::StringList oldFilenames = _saveFileMan->listSavefiles("game.*");
+ Common::StringArray oldFilenames = _saveFileMan->listSavefiles("game.*");
uint numOldSaves = oldFilenames.size();
bool rename = false;
Modified: scummvm/trunk/engines/parallaction/saveload.h
===================================================================
--- scummvm/trunk/engines/parallaction/saveload.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/parallaction/saveload.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -42,7 +42,7 @@
Common::InSaveFile *getInSaveFile(uint slot);
Common::OutSaveFile *getOutSaveFile(uint slot);
int selectSaveFile(Common::String &selectedName, bool saveMode, const Common::String &caption, const Common::String &button);
- int buildSaveFileList(Common::StringList& l);
+ int buildSaveFileList(Common::StringArray& l);
virtual void doLoadGame(uint16 slot) = 0;
virtual void doSaveGame(uint16 slot, const char* name) = 0;
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/queen/queen.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -141,7 +141,7 @@
SaveStateList QueenMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
char saveDesc[32];
Common::String pattern("queen.s??");
@@ -149,7 +149,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 2);
@@ -432,8 +432,8 @@
void QueenEngine::findGameStateDescriptions(char descriptions[100][32]) {
char prefix[20];
makeGameStateName(SLOT_LISTPREFIX, prefix);
- Common::StringList filenames = _saveFileMan->listSavefiles(prefix);
- for (Common::StringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it) {
+ Common::StringArray filenames = _saveFileMan->listSavefiles(prefix);
+ for (Common::StringArray::const_iterator it = filenames.begin(); it != filenames.end(); ++it) {
int i = getGameStateSlot(it->c_str());
if (i >= 0 && i < SAVESTATE_MAX_NUM) {
GameStateHeader header;
Modified: scummvm/trunk/engines/queen/resource.cpp
===================================================================
--- scummvm/trunk/engines/queen/resource.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/queen/resource.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -125,7 +125,7 @@
return dstBuf;
}
-void Resource::loadTextFile(const char *filename, Common::StringList &stringList) {
+void Resource::loadTextFile(const char *filename, Common::StringArray &stringList) {
debug(7, "Resource::loadTextFile('%s')", filename);
ResourceEntry *re = resourceEntry(filename);
assert(re != NULL);
Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/saga/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -190,7 +190,7 @@
SaveStateList SagaMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
char saveDesc[SAVE_TITLE_SIZE];
Common::String pattern = target;
pattern += ".s??";
@@ -200,7 +200,7 @@
SaveStateList saveList;
int slotNum = 0;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
slotNum = atoi(file->c_str() + file->size() - 2);
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/saga/saga.h 2010-03-18 15:54:40 UTC (rev 48287)
@@ -81,7 +81,6 @@
class Resource;
class ResourceContext;
-struct StringList;
using Common::MemoryReadStream;
using Common::MemoryReadStreamEndian;
@@ -390,7 +389,7 @@
const char *getString(int index) const {
if ((stringsCount <= index) || (index < 0)) {
// This occurs at the end of Ted's chapter, right after the ending cutscene
- warning("StringList::getString wrong index 0x%X (%d)", index, stringsCount);
+ warning("StringsTable::getString wrong index 0x%X (%d)", index, stringsCount);
return "";
}
return strings[index];
Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/saga/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -118,7 +118,7 @@
int i;
Common::InSaveFile *in;
- Common::StringList filenames;
+ Common::StringArray filenames;
char slot[3];
int slotNumber;
char *name;
@@ -136,7 +136,7 @@
_saveFilesCount = 0;
- for (Common::StringList::iterator file = filenames.begin(); file != filenames.end(); ++file){
+ for (Common::StringArray::iterator file = filenames.begin(); file != filenames.end(); ++file){
//Obtain the last 2 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sci/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -402,7 +402,7 @@
SaveStateList SciMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String pattern = target;
pattern += ".???";
@@ -411,7 +411,7 @@
SaveStateList saveList;
int slotNum = 0;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
slotNum = atoi(file->c_str() + file->size() - 3);
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -445,7 +445,7 @@
if (!r) { // No such resource?
// Check if we have a table for this game
// Some demos do not have a selector table
- Common::StringList staticSelectorTable = checkStaticSelectorNames();
+ Common::StringArray staticSelectorTable = checkStaticSelectorNames();
if (staticSelectorTable.empty())
error("Kernel: Could not retrieve selector names");
@@ -722,7 +722,7 @@
}
void Kernel::setDefaultKernelNames(Common::String gameId) {
- _kernelNames = Common::StringList(sci_default_knames, SCI_KNAMES_DEFAULT_ENTRIES_NR);
+ _kernelNames = Common::StringArray(sci_default_knames, SCI_KNAMES_DEFAULT_ENTRIES_NR);
// Some (later) SCI versions replaced CanBeHere by CantBeHere
if (_selectorCache.cantBeHere != -1)
Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -375,7 +375,7 @@
};
void Kernel::setKernelNamesSci2() {
- _kernelNames = Common::StringList(sci2_default_knames, kKernelEntriesSci2);
+ _kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesSci2);
}
void Kernel::setKernelNamesSci21(EngineState *s) {
@@ -387,13 +387,13 @@
// they would not be compatible with other games of the same interpreter.
if (g_sci->_features->detectSci21KernelType() == SCI_VERSION_2) {
- _kernelNames = Common::StringList(sci2_default_knames, kKernelEntriesGk2Demo);
+ _kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesGk2Demo);
// OnMe is IsOnMe here, but they should be compatible
_kernelNames[0x23] = "Robot"; // Graph in SCI2
_kernelNames[0x2e] = "Priority"; // DisposeTextBitmap in SCI2
} else {
// TODO: Differentiate between SCI2.1/3
- _kernelNames = Common::StringList(sci21_default_knames, kKernelEntriesSci3);
+ _kernelNames = Common::StringArray(sci21_default_knames, kKernelEntriesSci3);
}
}
Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -257,9 +257,9 @@
Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
// Load all saves
- Common::StringList saveNames = saveFileMan->listSavefiles(g_sci->getSavegamePattern());
+ Common::StringArray saveNames = saveFileMan->listSavefiles(g_sci->getSavegamePattern());
- for (Common::StringList::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) {
+ for (Common::StringArray::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) {
Common::String filename = *iter;
Common::SeekableReadStream *in;
if ((in = saveFileMan->openForLoading(filename))) {
Modified: scummvm/trunk/engines/sci/engine/static_selectors.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/static_selectors.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sci/engine/static_selectors.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -110,8 +110,8 @@
{ SCI_VERSION_NONE, SCI_VERSION_NONE, 0, 0 }
};
-Common::StringList Kernel::checkStaticSelectorNames() {
- Common::StringList names;
+Common::StringArray Kernel::checkStaticSelectorNames() {
+ Common::StringArray names;
const int offset = (getSciVersion() < SCI_VERSION_1_1) ? 3 : 0;
#ifdef ENABLE_SCI32
Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/scumm/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -1036,7 +1036,7 @@
SaveStateList ScummMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
Common::String saveDesc;
Common::String pattern = target;
pattern += ".s??";
@@ -1045,7 +1045,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 2);
Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/scumm/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -582,7 +582,7 @@
char slot[3];
int slotNum;
- Common::StringList files;
+ Common::StringArray files;
Common::String prefix = makeSavegameName(99, false);
prefix.setChar('*', prefix.size()-2);
@@ -590,7 +590,7 @@
memset(marks, false, num * sizeof(bool)); //assume no savegames for this title
files = _saveFileMan->listSavefiles(prefix);
- for (Common::StringList::const_iterator file = files.begin(); file != files.end(); ++file) {
+ for (Common::StringArray::const_iterator file = files.begin(); file != files.end(); ++file) {
//Obtain the last 2 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
Modified: scummvm/trunk/engines/sky/control.cpp
===================================================================
--- scummvm/trunk/engines/sky/control.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sky/control.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -838,7 +838,7 @@
}
bool withAutoSave = (lookListLen == 7);
- Common::StringList saveGameTexts;
+ Common::StringArray saveGameTexts;
DataFileHeader *textSprites[MAX_ON_SCREEN + 1];
for (cnt = 0; cnt < MAX_ON_SCREEN + 1; cnt++)
textSprites[cnt] = NULL;
@@ -982,7 +982,7 @@
}
}
-void Control::setUpGameSprites(const Common::StringList &saveGameNames, DataFileHeader **nameSprites, uint16 firstNum, uint16 selectedGame) {
+void Control::setUpGameSprites(const Common::StringArray &saveGameNames, DataFileHeader **nameSprites, uint16 firstNum, uint16 selectedGame) {
char cursorChar[2] = "-";
DisplayedText textSpr;
if (!nameSprites[MAX_ON_SCREEN]) {
@@ -1027,7 +1027,7 @@
delete drawResource;
}
-void Control::loadDescriptions(Common::StringList &savenames) {
+void Control::loadDescriptions(Common::StringArray &savenames) {
savenames.resize(MAX_SAVE_GAMES);
Common::InSaveFile *inf;
@@ -1072,7 +1072,7 @@
return result;
}
-void Control::saveDescriptions(const Common::StringList &list) {
+void Control::saveDescriptions(const Common::StringArray &list) {
Common::OutSaveFile *outf;
outf = _saveFileMan->openForSaving("SKY-VM.SAV");
Modified: scummvm/trunk/engines/sky/detection.cpp
===================================================================
--- scummvm/trunk/engines/sky/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sky/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -178,7 +178,7 @@
SaveStateList saveList;
// Load the descriptions
- Common::StringList savenames;
+ Common::StringArray savenames;
savenames.resize(MAX_SAVE_GAMES+1);
Common::InSaveFile *inf;
@@ -196,7 +196,7 @@
}
// Find all saves
- Common::StringList filenames;
+ Common::StringArray filenames;
filenames = saveFileMan->listSavefiles("SKY-VM.???");
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
@@ -206,7 +206,7 @@
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) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Extract the extension
Common::String ext = file->c_str() + file->size() - 3;
ext.toUppercase();
@@ -235,7 +235,7 @@
saveFileMan->removeSavefile(fName);
// Load current save game descriptions
- Common::StringList savenames;
+ Common::StringArray savenames;
savenames.resize(MAX_SAVE_GAMES+1);
Common::InSaveFile *inf;
inf = saveFileMan->openForLoading("SKY-VM.SAV");
@@ -294,7 +294,7 @@
return Common::kWritePermissionDenied;
// Load current save game descriptions
- Common::StringList saveGameTexts;
+ Common::StringArray saveGameTexts;
saveGameTexts.resize(MAX_SAVE_GAMES+1);
_skyControl->loadDescriptions(saveGameTexts);
Modified: scummvm/trunk/engines/sword1/control.cpp
===================================================================
--- scummvm/trunk/engines/sword1/control.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sword1/control.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -791,14 +791,14 @@
void Control::readSavegameDescriptions() {
char saveName[40];
Common::String pattern = "sword1.???";
- Common::StringList filenames = _saveFileMan->listSavefiles(pattern);
+ Common::StringArray filenames = _saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
_saveNames.clear();
int num = 0;
int slotNum = 0;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
slotNum = atoi(file->c_str() + file->size() - 3);
@@ -847,7 +847,7 @@
bool Control::savegamesExist() {
Common::String pattern = "sword1.???";
- Common::StringList saveNames = _saveFileMan->listSavefiles(pattern);
+ Common::StringArray saveNames = _saveFileMan->listSavefiles(pattern);
return saveNames.size() > 0;
}
Modified: scummvm/trunk/engines/sword1/detection.cpp
===================================================================
--- scummvm/trunk/engines/sword1/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sword1/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -228,11 +228,11 @@
SaveStateList saveList;
char saveName[40];
- Common::StringList filenames = saveFileMan->listSavefiles("sword1.???");
+ Common::StringArray filenames = saveFileMan->listSavefiles("sword1.???");
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
int slotNum = 0;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
slotNum = atoi(file->c_str() + file->size() - 3);
Modified: scummvm/trunk/engines/sword2/saveload.cpp
===================================================================
--- scummvm/trunk/engines/sword2/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sword2/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -389,7 +389,7 @@
bool Sword2Engine::saveExists() {
Common::String pattern = _targetName + ".???";
- Common::StringList filenames = _saveFileMan->listSavefiles(pattern);
+ Common::StringArray filenames = _saveFileMan->listSavefiles(pattern);
return !filenames.empty();
}
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -184,7 +184,7 @@
SaveStateList Sword2MetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
+ Common::StringArray filenames;
char saveDesc[SAVE_DESCRIPTION_LEN];
Common::String pattern = target;
pattern += ".???";
@@ -193,7 +193,7 @@
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::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);
Modified: scummvm/trunk/engines/teenagent/detection.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/teenagent/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -121,11 +121,11 @@
Common::String pattern = target;
pattern += ".*";
- Common::StringList filenames = g_system->getSavefileManager()->listSavefiles(pattern);
+ Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
Common::sort(filenames.begin(), filenames.end());
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
int slot;
const char *ext = strrchr(file->c_str(), '.');
if (ext && (slot = atoi(ext + 1)) >= 0 && slot < MAX_SAVES) {
Modified: scummvm/trunk/engines/tinsel/detection.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/tinsel/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -684,12 +684,12 @@
SaveStateList TinselMetaEngine::listSaves(const char *target) const {
Common::String pattern = target;
pattern = pattern + ".???";
- Common::StringList files = g_system->getSavefileManager()->listSavefiles(pattern);
+ Common::StringArray files = g_system->getSavefileManager()->listSavefiles(pattern);
sort(files.begin(), files.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
int slotNum = 0;
- for (Common::StringList::const_iterator file = files.begin(); file != files.end(); ++file) {
+ for (Common::StringArray::const_iterator file = files.begin(); file != files.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
slotNum = atoi(file->c_str() + file->size() - 3);
Modified: scummvm/trunk/engines/tinsel/saveload.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/saveload.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/tinsel/saveload.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -330,11 +330,11 @@
int i;
const Common::String pattern = target + ".???";
- Common::StringList files = saveFileMan->listSavefiles(pattern);
+ Common::StringArray files = saveFileMan->listSavefiles(pattern);
numSfiles = 0;
- for (Common::StringList::const_iterator file = files.begin(); file != files.end(); ++file) {
+ for (Common::StringArray::const_iterator file = files.begin(); file != files.end(); ++file) {
if (numSfiles >= MAX_SAVED_FILES)
break;
Modified: scummvm/trunk/engines/touche/detection.cpp
===================================================================
--- scummvm/trunk/engines/touche/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/touche/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -180,11 +180,11 @@
SaveStateList ToucheMetaEngine::listSaves(const char *target) const {
Common::String pattern = Touche::generateGameStateFileName(target, 0, true);
- Common::StringList filenames = g_system->getSavefileManager()->listSavefiles(pattern);
+ Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
bool slotsTable[Touche::kMaxSaveStates];
memset(slotsTable, 0, sizeof(slotsTable));
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
int slot = Touche::getGameStateFileSlot(file->c_str());
if (slot >= 0 && slot < Touche::kMaxSaveStates) {
slotsTable[slot] = true;
Modified: scummvm/trunk/engines/touche/menu.cpp
===================================================================
--- scummvm/trunk/engines/touche/menu.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/touche/menu.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -377,8 +377,8 @@
menuData.saveLoadDescriptionsTable[i][0] = 0;
}
Common::String gameStateFileName = generateGameStateFileName(_targetName.c_str(), 0, true);
- Common::StringList filenames = _saveFileMan->listSavefiles(gameStateFileName);
- for (Common::StringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it) {
+ Common::StringArray filenames = _saveFileMan->listSavefiles(gameStateFileName);
+ for (Common::StringArray::const_iterator it = filenames.begin(); it != filenames.end(); ++it) {
int i = getGameStateFileSlot(it->c_str());
if (i >= 0 && i < kMaxSaveStates) {
Common::InSaveFile *f = _saveFileMan->openForLoading(*it);
Modified: scummvm/trunk/engines/tucker/detection.cpp
===================================================================
--- scummvm/trunk/engines/tucker/detection.cpp 2010-03-18 15:44:59 UTC (rev 48286)
+++ scummvm/trunk/engines/tucker/detection.cpp 2010-03-18 15:54:40 UTC (rev 48287)
@@ -173,11 +173,11 @@
virtual SaveStateList listSaves(const char *target) const {
Common::String pattern = Tucker::generateGameStateFileName(target, 0, true);
- Common::StringList filenames = g_system->getSavefileManager()->listSavefiles(pattern);
+ Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
bool slotsTable[Tucker::kLastSaveSlot + 1];
memset(slotsTable, 0, sizeof(slotsTable));
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
int slot;
const char *ext = strrchr(file->c_str(), '.');
if (ext && (slot = atoi(ext + 1)) >= 0 && slot <= Tucker::kLastSaveSlot) {
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