Patch #1768757: Merge fsnode-gsoc into trunk (MAJOR change, will break compilation on some ports)

svn-id: r28944
This commit is contained in:
Max Horn 2007-09-18 20:02:04 +00:00
commit c3d3aebe87
73 changed files with 3061 additions and 1207 deletions

View file

@ -190,7 +190,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com
// the first match is used.
static bool searchFSNode(const FSList &fslist, const Common::String &name, FilesystemNode &result) {
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!scumm_stricmp(file->name().c_str(), name.c_str())) {
if (!scumm_stricmp(file->getName().c_str(), name.c_str())) {
result = *file;
return true;
}
@ -216,7 +216,7 @@ static Common::Language detectLanguage(const FSList &fslist, byte id) {
FSList tmpList;
if (searchFSNode(fslist, "RESOURCE", resDir)
&& resDir.isDirectory()
&& resDir.listDir(tmpList, FilesystemNode::kListFilesOnly)
&& resDir.getChildren(tmpList, FilesystemNode::kListFilesOnly)
&& searchFSNode(tmpList, filename, langFile)) {
tmp.open(langFile);
}
@ -320,7 +320,7 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu
DetectorDesc d;
d.node = *file;
d.md5Entry = 0;
fileMD5Map[file->name()] = d;
fileMD5Map[file->getName()] = d;
}
}
@ -447,7 +447,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com
Common::File tmp;
if (!tmp.open(d.node)) {
warning("SCUMM detectGames: failed to open '%s' for read access", d.node.path().c_str());
warning("SCUMM detectGames: failed to open '%s' for read access", d.node.getPath().c_str());
return false;
}
@ -751,7 +751,7 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) {
// Fetch the list of files in the current directory
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly)) {
return kInvalidPathError;
}