diff options
author | Vicent Marti | 2008-08-16 14:06:26 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-16 14:06:26 +0000 |
commit | 5201a46054a1390739b21532c45e0e9926b857bc (patch) | |
tree | 12c2981126b18c16a5acb430cb951ba6ef554621 /common | |
parent | 146be8e16b0abd43f87274a305d9d65b594d1d7f (diff) | |
download | scummvm-rg350-5201a46054a1390739b21532c45e0e9926b857bc.tar.gz scummvm-rg350-5201a46054a1390739b21532c45e0e9926b857bc.tar.bz2 scummvm-rg350-5201a46054a1390739b21532c45e0e9926b857bc.zip |
Added support for loading uncompressed/unpackaged themes.
svn-id: r33941
Diffstat (limited to 'common')
-rw-r--r-- | common/xmlparser.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/common/xmlparser.h b/common/xmlparser.h index e3d39bfb82..4d1c8fc85d 100644 --- a/common/xmlparser.h +++ b/common/xmlparser.h @@ -32,6 +32,7 @@ #include "common/xmlparser.h" #include "common/stream.h" #include "common/file.h" +#include "common/fs.h" #include "common/hashmap.h" #include "common/hash-str.h" @@ -342,7 +343,7 @@ public: * * @param filename Name of the file to load. */ - bool loadFile(Common::String filename) { + bool loadFile(const Common::String &filename) { Common::File *f = new Common::File; if (!f->open(filename)) { @@ -354,6 +355,19 @@ public: _text.loadStream(f); return true; } + + bool loadFile(const FilesystemNode &node) { + Common::File *f = new Common::File; + + if (!f->open(node)) { + delete f; + return false; + } + + _fileName = node.getName(); + _text.loadStream(f); + return true; + } /** * Loads a memory buffer into the parser. |