aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/detection.cpp4
-rw-r--r--engines/agi/sound.cpp10
-rw-r--r--engines/agos/detection.cpp4
-rw-r--r--engines/agos/saveload.cpp4
-rw-r--r--engines/cine/cine.h2
-rw-r--r--engines/cine/detection.cpp4
-rw-r--r--engines/cine/gfx.cpp2
-rw-r--r--engines/cine/gfx.h4
-rw-r--r--engines/cine/msg.cpp2
-rw-r--r--engines/cine/various.cpp4
-rw-r--r--engines/cruise/cruise.h2
-rw-r--r--engines/cruise/detection.cpp4
-rw-r--r--engines/draci/detection.cpp4
-rw-r--r--engines/groovie/saveload.cpp4
-rw-r--r--engines/kyra/detection.cpp4
-rw-r--r--engines/kyra/gui.cpp4
-rw-r--r--engines/lure/detection.cpp4
-rw-r--r--engines/mohawk/console.cpp4
-rw-r--r--engines/mohawk/detection.cpp6
-rw-r--r--engines/mohawk/myst.cpp4
-rw-r--r--engines/mohawk/myst_saveload.cpp2
-rw-r--r--engines/mohawk/myst_saveload.h2
-rw-r--r--engines/mohawk/riven.cpp4
-rw-r--r--engines/mohawk/riven_saveload.cpp2
-rw-r--r--engines/mohawk/riven_saveload.h2
-rw-r--r--engines/parallaction/detection.cpp4
-rw-r--r--engines/parallaction/parallaction_ns.cpp2
-rw-r--r--engines/parallaction/saveload.cpp8
-rw-r--r--engines/parallaction/saveload.h2
-rw-r--r--engines/queen/queen.cpp8
-rw-r--r--engines/queen/resource.cpp2
-rw-r--r--engines/saga/detection.cpp4
-rw-r--r--engines/saga/saga.h3
-rw-r--r--engines/saga/saveload.cpp4
-rw-r--r--engines/sci/detection.cpp4
-rw-r--r--engines/sci/engine/kernel.cpp4
-rw-r--r--engines/sci/engine/kernel32.cpp6
-rw-r--r--engines/sci/engine/kfile.cpp4
-rw-r--r--engines/sci/engine/static_selectors.cpp4
-rw-r--r--engines/scumm/detection.cpp4
-rw-r--r--engines/scumm/saveload.cpp4
-rw-r--r--engines/sky/control.cpp8
-rw-r--r--engines/sky/detection.cpp10
-rw-r--r--engines/sword1/control.cpp6
-rw-r--r--engines/sword1/detection.cpp4
-rw-r--r--engines/sword2/saveload.cpp2
-rw-r--r--engines/sword2/sword2.cpp4
-rw-r--r--engines/teenagent/detection.cpp4
-rw-r--r--engines/tinsel/detection.cpp4
-rw-r--r--engines/tinsel/saveload.cpp4
-rw-r--r--engines/touche/detection.cpp4
-rw-r--r--engines/touche/menu.cpp4
-rw-r--r--engines/tucker/detection.cpp4
53 files changed, 108 insertions, 109 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 1006d48ab7..ea980c2676 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -1048,7 +1048,7 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
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 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 24abf88c0e..6b3ecab8f0 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -1194,16 +1194,16 @@ bool IIgsSoundMgr::loadWaveFile(const Common::FSNode &wavePath, const IIgsExeInf
*/
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 &param) 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 @@ bool SoundMgr::loadInstruments() {
}
// 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");
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index 9484e17d8e..39974f9d53 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -185,7 +185,7 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
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 @@ SaveStateList AgosMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 603ac7ea92..191e2fd4a0 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -37,7 +37,7 @@ namespace AGOS {
int AGOSEngine::countSaveGames() {
Common::InSaveFile *f;
- Common::StringList filenames;
+ Common::StringArray filenames;
uint i = 1;
char slot[4];
int slotNum;
@@ -49,7 +49,7 @@ int AGOSEngine::countSaveGames() {
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];
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index 911577e89e..77d4866363 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -130,7 +130,7 @@ public:
Common::RandomSource _rnd;
- Common::StringList _volumeResourceFiles;
+ Common::StringArray _volumeResourceFiles;
StringPtrHashMap _volumeEntriesMap;
TextHandler _textHandler;
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 3b5ca670d0..fcfa1f7f20 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -619,9 +619,9 @@ SaveStateList CineMetaEngine::listSaves(const char *target) const {
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";
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 3370688d1d..f55cae1277 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -833,7 +833,7 @@ void FWRenderer::clearMenuStack() {
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) {
}
diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h
index caf9b44ba7..64e9730720 100644
--- a/engines/cine/gfx.h
+++ b/engines/cine/gfx.h
@@ -84,7 +84,7 @@ private:
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 @@ public:
private:
const Common::Point _pos;
const int _width;
- const Common::StringList _elements;
+ const Common::StringArray _elements;
int _selection;
};
diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp
index eb7167c6a3..45f81f7d05 100644
--- a/engines/cine/msg.cpp
+++ b/engines/cine/msg.cpp
@@ -33,7 +33,7 @@ namespace Cine {
// 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;
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index e7c7f9b938..f8588b1bc5 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -502,7 +502,7 @@ void processInventory(int16 x, int16 y) {
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 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X,
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);
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index 3d5d0499af..0428240167 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -66,7 +66,7 @@ private:
bool _preLoad;
Debugger *_debugger;
PCSound *_sound;
- Common::StringList _langStrings;
+ Common::StringArray _langStrings;
CursorType _savedCursor;
uint32 lastTick, lastTickDebug;
int _gameSpeed;
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index 0c6c55d621..ea49a5fa5e 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -271,14 +271,14 @@ bool CruiseMetaEngine::hasFeature(MetaEngineFeature f) const {
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);
diff --git a/engines/draci/detection.cpp b/engines/draci/detection.cpp
index e467935f48..ac809f8454 100644
--- a/engines/draci/detection.cpp
+++ b/engines/draci/detection.cpp
@@ -130,14 +130,14 @@ bool DraciMetaEngine::hasFeature(MetaEngineFeature f) const {
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);
diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp
index 6e4a61fbac..423829c5fe 100644
--- a/engines/groovie/saveload.cpp
+++ b/engines/groovie/saveload.cpp
@@ -50,13 +50,13 @@ SaveStateList SaveLoad::listValidSaves(const Common::String &target) {
// 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;
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 002f9dee09..be3cd2bf3a 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -1321,12 +1321,12 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index ac14a408a9..9f5d29d7b9 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -370,10 +370,10 @@ int GUI::redrawShadedButtonCallback(Button *button) {
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];
diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp
index 598a6454ff..2db489884f 100644
--- a/engines/lure/detection.cpp
+++ b/engines/lure/detection.cpp
@@ -242,7 +242,7 @@ bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
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 @@ SaveStateList LureMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 7521bcd194..389665db39 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -510,7 +510,7 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
// 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 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
// Load in External Command Names
nameStream = _vm->getRawData(ID_NAME, ExternalCommandNames);
- Common::StringList xNames;
+ Common::StringArray xNames;
namesCount = nameStream->readUint16BE();
stringOffsets = new uint16[namesCount];
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index 65353b61e7..a7b1fe7fae 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -1005,7 +1005,7 @@ bool MohawkMetaEngine::hasFeature(MetaEngineFeature f) const {
}
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 @@ SaveStateList MohawkMetaEngine::listSaves(const char *target) const {
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());
}
}
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 1055414d1f..5835c7e69d 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -222,7 +222,7 @@ Common::Error MohawkEngine_Myst::run() {
// 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::loadGameState(int slot) {
}
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]);
diff --git a/engines/mohawk/myst_saveload.cpp b/engines/mohawk/myst_saveload.cpp
index e13866ea13..b04b3cac77 100644
--- a/engines/mohawk/myst_saveload.cpp
+++ b/engines/mohawk/myst_saveload.cpp
@@ -39,7 +39,7 @@ MystSaveLoad::~MystSaveLoad() {
delete _v;
}
-Common::StringList MystSaveLoad::generateSaveGameList() {
+Common::StringArray MystSaveLoad::generateSaveGameList() {
return _saveFileMan->listSavefiles("*.mys");
}
diff --git a/engines/mohawk/myst_saveload.h b/engines/mohawk/myst_saveload.h
index f5df581378..b3f3cfaef4 100644
--- a/engines/mohawk/myst_saveload.h
+++ b/engines/mohawk/myst_saveload.h
@@ -194,7 +194,7 @@ public:
MystSaveLoad(MohawkEngine_Myst*, Common::SaveFileManager*);
~MystSaveLoad();
- Common::StringList generateSaveGameList();
+ Common::StringArray generateSaveGameList();
bool loadGame(Common::String);
bool saveGame(Common::String);
void deleteSave(Common::String);
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 2c5f849ba9..d5a4e9b140 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -98,7 +98,7 @@ Common::Error MohawkEngine_Riven::run() {
// 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::loadGameState(int slot) {
}
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]);
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index a4e2363be2..3c989838da 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -38,7 +38,7 @@ RivenSaveLoad::~RivenSaveLoad() {
delete _loadFile;
}
-Common::StringList RivenSaveLoad::generateSaveGameList() {
+Common::StringArray RivenSaveLoad::generateSaveGameList() {
return _saveFileMan->listSavefiles("*.rvn");
}
diff --git a/engines/mohawk/riven_saveload.h b/engines/mohawk/riven_saveload.h
index cef2bfb7eb..c708f9d35d 100644
--- a/engines/mohawk/riven_saveload.h
+++ b/engines/mohawk/riven_saveload.h
@@ -45,7 +45,7 @@ public:
RivenSaveLoad(MohawkEngine_Riven*, Common::SaveFileManager*);
~RivenSaveLoad();
- Common::StringList generateSaveGameList();
+ Common::StringArray generateSaveGameList();
bool loadGame(Common::String);
bool saveGame(Common::String);
void deleteSave(Common::String);
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index bda88e7812..af5fb99180 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -295,7 +295,7 @@ bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, cons
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 @@ SaveStateList ParallactionMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index e271ba595e..d79e89cbc6 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -116,7 +116,7 @@ void LocationName::bind(const char *s) {
_hasSlide = false;
_hasCharacter = false;
- Common::StringList list;
+ Common::StringArray list;
char *tok = strtok(_buf, ".");
while (tok) {
list.push_back(tok);
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index cb0dccbcee..08bae50db0 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -193,9 +193,9 @@ void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) {
-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::buildSaveFileList(Common::StringList& l) {
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 @@ static bool askRenameOldSavefiles() {
}
void SaveLoad_ns::renameOldSavefiles() {
- Common::StringList oldFilenames = _saveFileMan->listSavefiles("game.*");
+ Common::StringArray oldFilenames = _saveFileMan->listSavefiles("game.*");
uint numOldSaves = oldFilenames.size();
bool rename = false;
diff --git a/engines/parallaction/saveload.h b/engines/parallaction/saveload.h
index 3c3f4d53f9..80a2c4d8a9 100644
--- a/engines/parallaction/saveload.h
+++ b/engines/parallaction/saveload.h
@@ -42,7 +42,7 @@ protected:
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;
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 7c351842c4..29d9452f4c 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -141,7 +141,7 @@ GameList QueenMetaEngine::detectGames(const Common::FSList &fslist) const {
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 @@ SaveStateList QueenMetaEngine::listSaves(const char *target) const {
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 @@ int QueenEngine::getGameStateSlot(const char *filename) const {
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;
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp
index 9fa62eee27..fda12eb7c5 100644
--- a/engines/queen/resource.cpp
+++ b/engines/queen/resource.cpp
@@ -125,7 +125,7 @@ uint8 *Resource::loadFile(const char *filename, uint32 skipBytes, uint32 *size)
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);
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index 807345cd7b..1c2c6bacff 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -190,7 +190,7 @@ bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
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 SagaMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index fc783933f1..9b97e54dc4 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -81,7 +81,6 @@ class Puzzle;
class Resource;
class ResourceContext;
-struct StringList;
using Common::MemoryReadStream;
using Common::MemoryReadStreamEndian;
@@ -390,7 +389,7 @@ struct StringsTable {
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];
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 53811fda1d..951d0a5698 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -118,7 +118,7 @@ void SagaEngine::fillSaveList() {
int i;
Common::InSaveFile *in;
- Common::StringList filenames;
+ Common::StringArray filenames;
char slot[3];
int slotNumber;
char *name;
@@ -136,7 +136,7 @@ void SagaEngine::fillSaveList() {
_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];
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index b36c183895..3c526dd1cd 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -402,7 +402,7 @@ bool SciEngine::hasFeature(EngineFeature f) const {
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 SciMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index bc84921367..85c4150276 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -445,7 +445,7 @@ void Kernel::loadSelectorNames() {
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 @@ bool kernel_matches_signature(SegManager *segMan, const char *sig, int argc, con
}
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)
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index 382200355d..9d3b80a5ae 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -375,7 +375,7 @@ enum {
};
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 @@ void Kernel::setKernelNamesSci21(EngineState *s) {
// 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);
}
}
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index e54aaee051..22abc4b193 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -257,9 +257,9 @@ void listSavegames(Common::Array<SavegameDesc> &saves) {
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))) {
diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp
index 6775952171..0f558f2dc8 100644
--- a/engines/sci/engine/static_selectors.cpp
+++ b/engines/sci/engine/static_selectors.cpp
@@ -110,8 +110,8 @@ static const SelectorRemap sciSelectorRemap[] = {
{ 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
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index e1a2a4866a..4e031d6672 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -1036,7 +1036,7 @@ int ScummMetaEngine::getMaximumSaveSlot() const { return 99; }
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 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 1ba7cdbce1..24fbf0949e 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -582,7 +582,7 @@ void ScummEngine::listSavegames(bool *marks, int num) {
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 @@ void ScummEngine::listSavegames(bool *marks, int num) {
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];
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 30c616f12d..7b59fa2726 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -838,7 +838,7 @@ uint16 Control::saveRestorePanel(bool allowSave) {
}
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::handleKeyPress(Common::KeyState kbd, Common::String &textBuf) {
}
}
-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 @@ void Control::showSprites(DataFileHeader **nameSprites, bool allowSave) {
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 @@ int Control::displayMessage(const char *altButton, const char *message, ...) {
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");
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 8feffab6e6..e72875fa4e 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -178,7 +178,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
SaveStateList saveList;
// Load the descriptions
- Common::StringList savenames;
+ Common::StringArray savenames;
savenames.resize(MAX_SAVE_GAMES+1);
Common::InSaveFile *inf;
@@ -196,7 +196,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
}
// 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 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
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 @@ void SkyMetaEngine::removeSaveState(const char *target, int slot) const {
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 @@ Common::Error SkyEngine::saveGameState(int slot, const char *desc) {
return Common::kWritePermissionDenied;
// Load current save game descriptions
- Common::StringList saveGameTexts;
+ Common::StringArray saveGameTexts;
saveGameTexts.resize(MAX_SAVE_GAMES+1);
_skyControl->loadDescriptions(saveGameTexts);
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index dd57d8f98e..d6a04513a8 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -791,14 +791,14 @@ bool Control::restoreFromFile() {
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 @@ int Control::displayMessage(const char *altButton, const char *message, ...) {
bool Control::savegamesExist() {
Common::String pattern = "sword1.???";
- Common::StringList saveNames = _saveFileMan->listSavefiles(pattern);
+ Common::StringArray saveNames = _saveFileMan->listSavefiles(pattern);
return saveNames.size() > 0;
}
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index e6cc5e09fa..e51a3d6a8d 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -228,11 +228,11 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/sword2/saveload.cpp b/engines/sword2/saveload.cpp
index 253aad5644..9258d37fe3 100644
--- a/engines/sword2/saveload.cpp
+++ b/engines/sword2/saveload.cpp
@@ -389,7 +389,7 @@ uint32 Sword2Engine::getSaveDescription(uint16 slotNo, byte *description) {
bool Sword2Engine::saveExists() {
Common::String pattern = _targetName + ".???";
- Common::StringList filenames = _saveFileMan->listSavefiles(pattern);
+ Common::StringArray filenames = _saveFileMan->listSavefiles(pattern);
return !filenames.empty();
}
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 822946f42d..da34783ec8 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -184,7 +184,7 @@ GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
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 @@ SaveStateList Sword2MetaEngine::listSaves(const char *target) const {
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);
diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp
index fdff5fce6d..9cc75e91b2 100644
--- a/engines/teenagent/detection.cpp
+++ b/engines/teenagent/detection.cpp
@@ -121,11 +121,11 @@ public:
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) {
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index 76ba8ab17b..4e832e9567 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -684,12 +684,12 @@ extern int getList(Common::SaveFileManager *saveFileMan, const Common::String &t
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);
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 1c817ff763..c56d295e72 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -330,11 +330,11 @@ int getList(Common::SaveFileManager *saveFileMan, const Common::String &target)
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;
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index efe09ead5e..65a6a29bcc 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -180,11 +180,11 @@ bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
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;
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index abc7944ccc..52967c25c7 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -377,8 +377,8 @@ void ToucheEngine::handleOptions(int forceDisplay) {
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);
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp
index dae9f4b39d..b4f30cb7fd 100644
--- a/engines/tucker/detection.cpp
+++ b/engines/tucker/detection.cpp
@@ -173,11 +173,11 @@ public:
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) {