diff options
Diffstat (limited to 'engines/toltecs')
-rw-r--r-- | engines/toltecs/detection.cpp | 8 | ||||
-rw-r--r-- | engines/toltecs/menu.cpp | 4 | ||||
-rw-r--r-- | engines/toltecs/toltecs.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp index ce43927bed..f64461b4b0 100644 --- a/engines/toltecs/detection.cpp +++ b/engines/toltecs/detection.cpp @@ -183,12 +183,12 @@ SaveStateList ToltecsMetaEngine::listSaves(const char *target) const { Common::String pattern = target; pattern += ".???"; - Common::StringList filenames; + Common::StringArray filenames; filenames = saveFileMan->listSavefiles(pattern.c_str()); 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); @@ -220,13 +220,13 @@ void ToltecsMetaEngine::removeSaveState(const char *target, int slot) const { saveFileMan->removeSavefile(filename.c_str()); - Common::StringList filenames; + Common::StringArray filenames; Common::String pattern = target; pattern += ".???"; filenames = saveFileMan->listSavefiles(pattern.c_str()); Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) - 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/toltecs/menu.cpp b/engines/toltecs/menu.cpp index e433025971..0fe8d767f0 100644 --- a/engines/toltecs/menu.cpp +++ b/engines/toltecs/menu.cpp @@ -439,11 +439,11 @@ void MenuSystem::initSavegames() { Common::String pattern = _vm->getTargetName(); pattern += ".???"; - Common::StringList filenames; + Common::StringArray filenames; filenames = saveFileMan->listSavefiles(pattern.c_str()); Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) - for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) { + for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); file++) { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { if (_vm->readSaveHeader(in, false, header) == Toltecs::ToltecsEngine::kRSHENoError) { diff --git a/engines/toltecs/toltecs.h b/engines/toltecs/toltecs.h index 9a2ed704fd..7816b3b2e9 100644 --- a/engines/toltecs/toltecs.h +++ b/engines/toltecs/toltecs.h @@ -28,6 +28,7 @@ #include "common/endian.h" #include "common/util.h" #include "common/file.h" +#include "common/random.h" #include "common/savefile.h" #include "common/system.h" #include "common/hash-str.h" |