diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-10 18:30:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-10 18:35:33 +0300 |
commit | 7ba901978bf2f5ba96bd85d18c226490e39580c9 (patch) | |
tree | e616fa65cb7e9b64fa3e32fdf32f4e3ff8831b69 /src/resources/loaders/xmlloader.cpp | |
parent | fe8e481910ec72c9d70b00737f89d5780f1a3cc5 (diff) | |
download | mv-7ba901978bf2f5ba96bd85d18c226490e39580c9.tar.gz mv-7ba901978bf2f5ba96bd85d18c226490e39580c9.tar.bz2 mv-7ba901978bf2f5ba96bd85d18c226490e39580c9.tar.xz mv-7ba901978bf2f5ba96bd85d18c226490e39580c9.zip |
Use xml loader in particle effects.
Diffstat (limited to 'src/resources/loaders/xmlloader.cpp')
-rw-r--r-- | src/resources/loaders/xmlloader.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/resources/loaders/xmlloader.cpp b/src/resources/loaders/xmlloader.cpp index b834c8788..de227a1cb 100644 --- a/src/resources/loaders/xmlloader.cpp +++ b/src/resources/loaders/xmlloader.cpp @@ -33,7 +33,9 @@ namespace { struct ResourceLoader final { - std::string path; + const std::string path; + const UseResman useResman; + const SkipError skipError; static Resource *load(const void *const v) { @@ -48,16 +50,20 @@ namespace rl->path.c_str()); return nullptr; } - Resource *const res = nullptr; + Resource *const res = new XML::Document(rl->path, + rl->useResman, + rl->skipError); return res; } }; } // namespace -XML::Document *Loader::getXml(const std::string &idPath) +XML::Document *Loader::getXml(const std::string &idPath, + const UseResman useResman, + const SkipError skipError) { - ResourceLoader rl = { idPath}; + ResourceLoader rl = { idPath, useResman, skipError }; return static_cast<XML::Document*>(resourceManager->get( idPath, ResourceLoader::load, &rl)); } |