aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc
diff options
context:
space:
mode:
authorMax Horn2008-10-02 16:58:59 +0000
committerMax Horn2008-10-02 16:58:59 +0000
commitc7fde102e325b423b1b153a78f7544697c052b72 (patch)
tree051aa4e66c66a20fa52fbb771328df5ea8d4790a /backends/platform/dc
parent31be8a6b3f22880378db870600b29906135c8ef5 (diff)
downloadscummvm-rg350-c7fde102e325b423b1b153a78f7544697c052b72.tar.gz
scummvm-rg350-c7fde102e325b423b1b153a78f7544697c052b72.tar.bz2
scummvm-rg350-c7fde102e325b423b1b153a78f7544697c052b72.zip
Renamed FilesystemNode -> FSNode
svn-id: r34716
Diffstat (limited to 'backends/platform/dc')
-rw-r--r--backends/platform/dc/dc-fs.cpp30
-rw-r--r--backends/platform/dc/dc.h6
-rw-r--r--backends/platform/dc/selector.cpp8
3 files changed, 22 insertions, 22 deletions
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index 4baba5b7dc..d77e1c86df 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -33,9 +33,9 @@
/**
* Implementation of the ScummVM file system API based on Ronin.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class RoninCDFileNode : public AbstractFilesystemNode {
+class RoninCDFileNode : public AbstractFSNode {
protected:
Common::String _path;
@@ -49,14 +49,14 @@ public:
virtual bool isReadable() const { return true; }
virtual bool isWritable() const { return false; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const { return NULL; }
+ virtual AbstractFSNode *getChild(const Common::String &n) const { return NULL; }
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const { return false; }
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting() { return 0; }
- static AbstractFilesystemNode *makeFileNodePath(const Common::String &path);
+ static AbstractFSNode *makeFileNodePath(const Common::String &path);
};
/* A directory */
@@ -65,7 +65,7 @@ public:
RoninCDDirectoryNode(const Common::String &path) : RoninCDFileNode(path) {};
virtual bool isDirectory() const { return true; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual Common::SeekableReadStream *openForReading() { return 0; }
};
@@ -80,7 +80,7 @@ public:
virtual Common::SeekableReadStream *openForReading() { return 0; }
};
-AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) {
+AbstractFSNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) {
assert(path.size() > 0);
int fd;
@@ -96,7 +96,7 @@ AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &
}
}
-AbstractFilesystemNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
+AbstractFSNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
Common::String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
@@ -122,13 +122,13 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
if (dp->d_size < 0) {
// Honor the chosen mode
- if (mode == Common::FilesystemNode::kListFilesOnly)
+ if (mode == Common::FSNode::kListFilesOnly)
continue;
myList.push_back(new RoninCDDirectoryNode(newPath+"/"));
} else {
// Honor the chosen mode
- if (mode == Common::FilesystemNode::kListDirectoriesOnly)
+ if (mode == Common::FSNode::kListDirectoriesOnly)
continue;
myList.push_back(new RoninCDFileNode(newPath));
@@ -139,7 +139,7 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
return true;
}
-AbstractFilesystemNode *RoninCDFileNode::getParent() const {
+AbstractFSNode *RoninCDFileNode::getParent() const {
if (_path == "/")
return 0;
@@ -154,16 +154,16 @@ Common::SeekableReadStream *RoninCDFileNode::openForReading() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeRootFileNode() const {
+AbstractFSNode *OSystem_Dreamcast::makeRootFileNode() const {
return new RoninCDDirectoryNode("/");
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
return makeRootFileNode();
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
- AbstractFilesystemNode *node = RoninCDFileNode::makeFileNodePath(path);
+AbstractFSNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
+ AbstractFSNode *node = RoninCDFileNode::makeFileNodePath(path);
return (node? node : new RoninCDNonexistingNode(path));
}
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 9dfd4c331e..54cd2e982b 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -189,9 +189,9 @@ class OSystem_Dreamcast : public OSystem, public FilesystemFactory {
// Filesystem
FilesystemFactory *getFilesystemFactory() { return this; }
- AbstractFilesystemNode *makeRootFileNode() const;
- AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ AbstractFSNode *makeRootFileNode() const;
+ AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ AbstractFSNode *makeFileNodePath(const Common::String &path) const;
private:
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 883787781a..f9646ff22f 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -146,12 +146,12 @@ struct Dir
{
char name[252];
char deficon[256];
- Common::FilesystemNode node;
+ Common::FSNode node;
};
static Game the_game;
-static bool isIcon(const Common::FilesystemNode &entry)
+static bool isIcon(const Common::FSNode &entry)
{
int l = entry.getDisplayName().size();
if (l>4 && !strcasecmp(entry.getDisplayName().c_str()+l-4, ".ICO"))
@@ -198,13 +198,13 @@ static int findGames(Game *games, int max)
{
Dir *dirs = new Dir[MAX_DIR];
int curr_game = 0, curr_dir = 0, num_dirs = 1;
- dirs[0].node = Common::FilesystemNode("");
+ dirs[0].node = Common::FSNode("");
while (curr_game < max && curr_dir < num_dirs) {
strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 252);
dirs[curr_dir].name[251] = '\0';
dirs[curr_dir].deficon[0] = '\0';
Common::FSList files, fslist;
- dirs[curr_dir++].node.getChildren(fslist, Common::FilesystemNode::kListAll);
+ dirs[curr_dir++].node.getChildren(fslist, Common::FSNode::kListAll);
for (Common::FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
++entry) {
if (entry->isDirectory()) {