aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBenjamin Haisch2010-03-22 12:14:11 +0000
committerWillem Jan Palenstijn2011-11-20 22:43:09 +0100
commit34eb899b25edb462267b3a0593fd4b3f324b3546 (patch)
treef009287add12f69e3a247d79b6af92cf1c79ae4d /engines
parent0d1a9148f3a24be60c4924875886a2ff60624b77 (diff)
downloadscummvm-rg350-34eb899b25edb462267b3a0593fd4b3f324b3546.tar.gz
scummvm-rg350-34eb899b25edb462267b3a0593fd4b3f324b3546.tar.bz2
scummvm-rg350-34eb899b25edb462267b3a0593fd4b3f324b3546.zip
TOLTECS: Fixed compilation
Diffstat (limited to 'engines')
-rw-r--r--engines/toltecs/detection.cpp8
-rw-r--r--engines/toltecs/menu.cpp4
-rw-r--r--engines/toltecs/toltecs.h1
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"