diff options
author | Max Horn | 2008-09-03 11:22:51 +0000 |
---|---|---|
committer | Max Horn | 2008-09-03 11:22:51 +0000 |
commit | 531bcf847ceef2b9eca82e0b3ef8473612889632 (patch) | |
tree | 62165f50a0cf03be924036a3249522e22dd62102 /engines/agi | |
parent | c350ffabf3d589722b1bee95f63a783fbf39cc1b (diff) | |
download | scummvm-rg350-531bcf847ceef2b9eca82e0b3ef8473612889632.tar.gz scummvm-rg350-531bcf847ceef2b9eca82e0b3ef8473612889632.tar.bz2 scummvm-rg350-531bcf847ceef2b9eca82e0b3ef8473612889632.zip |
Moved FilesystemNode / FSList to namespace Common; also got rid of some 'typedef Common::String String;' name aliases
svn-id: r34302
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/detection.cpp | 12 | ||||
-rw-r--r-- | engines/agi/loader_v3.cpp | 8 | ||||
-rw-r--r-- | engines/agi/sound.cpp | 14 |
3 files changed, 17 insertions, 17 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 6b65526226..9caf09fd28 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2126,7 +2126,7 @@ public: virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; virtual SaveStateList listSaves(const char *target) const; - const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const; + const Common::ADGameDescription *fallbackDetect(const Common::FSList *fslist) const; }; bool AgiMetaEngine::hasFeature(MetaEngineFeature f) const { @@ -2189,7 +2189,7 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const { return saveList; } -const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const FSList *fslist) const { +const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const Common::FSList *fslist) const { typedef Common::HashMap<Common::String, int32> IntMap; IntMap allFiles; bool matchedUsingFilenames = false; @@ -2198,7 +2198,7 @@ const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const FSList *fsl WagFileParser wagFileParser; Common::String wagFilePath; Common::String description; - FSList fslistCurrentDir; // Only used if fslist == NULL + Common::FSList fslistCurrentDir; // Only used if fslist == NULL // // Set the defaults for gameid and extra _gameid = "agi-fanmade"; @@ -2211,8 +2211,8 @@ const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const FSList *fsl if (path.empty()) path = "."; - FilesystemNode fsCurrentDir(path); - fsCurrentDir.getChildren(fslistCurrentDir, FilesystemNode::kListFilesOnly); + Common::FilesystemNode fsCurrentDir(path); + fsCurrentDir.getChildren(fslistCurrentDir, Common::FilesystemNode::kListFilesOnly); fslist = &fslistCurrentDir; } @@ -2227,7 +2227,7 @@ const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const FSList *fsl g_fallbackDesc.version = 0x2917; // First grab all filenames and at the same time count the number of *.wag files - for (FSList::const_iterator file = fslist->begin(); file != fslist->end(); ++file) { + for (Common::FSList::const_iterator file = fslist->begin(); file != fslist->end(); ++file) { if (file->isDirectory()) continue; Common::String filename = file->getName(); filename.toLowercase(); diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp index 9f1255a43a..656ae232ec 100644 --- a/engines/agi/loader_v3.cpp +++ b/engines/agi/loader_v3.cpp @@ -47,15 +47,15 @@ int AgiLoader_v3::detectGame() { int ec = errUnk; bool found = false; - FSList fslist; - FilesystemNode dir(ConfMan.get("path")); + Common::FSList fslist; + Common::FilesystemNode dir(ConfMan.get("path")); - if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly)) { + if (!dir.getChildren(fslist, Common::FilesystemNode::kListFilesOnly)) { warning("AgiEngine: invalid game path '%s'", dir.getPath().c_str()); return errInvalidAGIFile; } - for (FSList::const_iterator file = fslist.begin(); + for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end() && !found; ++file) { Common::String f = file->getName(); f.toLowercase(); diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index 9fe8fbf41a..1312dd414d 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -1107,14 +1107,14 @@ bool IIgsSoundMgr::loadWaveFile(const Common::String &wavePath, const IIgsExeInf } /** - * A function object (i.e. a functor) for testing if a FilesystemNode + * A function object (i.e. a functor) for testing if a Common::FilesystemNode * object's name is equal (Ignoring case) to a string or to at least * one of the strings in a list of strings. Can be used e.g. with find_if(). */ -struct fsnodeNameEqualsIgnoreCase : public Common::UnaryFunction<const FilesystemNode&, bool> { +struct fsnodeNameEqualsIgnoreCase : public Common::UnaryFunction<const Common::FilesystemNode&, bool> { fsnodeNameEqualsIgnoreCase(const Common::StringList &str) : _str(str) {} fsnodeNameEqualsIgnoreCase(const Common::String str) { _str.push_back(str); } - bool operator()(const FilesystemNode ¶m) const { + bool operator()(const Common::FilesystemNode ¶m) const { for (Common::StringList::const_iterator iter = _str.begin(); iter != _str.end(); iter++) if (param.getName().equalsIgnoreCase(*iter)) return true; @@ -1139,9 +1139,9 @@ bool SoundMgr::loadInstruments() { } // List files in the game path - FSList fslist; - FilesystemNode dir(ConfMan.get("path")); - if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly)) { + Common::FSList fslist; + Common::FilesystemNode dir(ConfMan.get("path")); + if (!dir.getChildren(fslist, Common::FilesystemNode::kListFilesOnly)) { warning("Invalid game path (\"%s\"), not loading Apple IIGS instruments", dir.getPath().c_str()); return false; } @@ -1157,7 +1157,7 @@ bool SoundMgr::loadInstruments() { waveNames.push_back("SIERRAST"); // Search for the executable file and the wave file (i.e. check if any of the filenames match) - FSList::const_iterator exeFsnode, waveFsnode; + Common::FSList::const_iterator exeFsnode, waveFsnode; exeFsnode = Common::find_if(fslist.begin(), fslist.end(), fsnodeNameEqualsIgnoreCase(exeNames)); waveFsnode = Common::find_if(fslist.begin(), fslist.end(), fsnodeNameEqualsIgnoreCase(waveNames)); |