From 7ba901978bf2f5ba96bd85d18c226490e39580c9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 Aug 2016 18:30:46 +0300 Subject: Use xml loader in particle effects. --- src/resources/loaders/xmlloader.cpp | 14 ++++++++++---- src/resources/loaders/xmlloader.h | 4 +++- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src/resources/loaders') 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(resourceManager->get( idPath, ResourceLoader::load, &rl)); } diff --git a/src/resources/loaders/xmlloader.h b/src/resources/loaders/xmlloader.h index d898a0092..4133271fa 100644 --- a/src/resources/loaders/xmlloader.h +++ b/src/resources/loaders/xmlloader.h @@ -29,7 +29,9 @@ namespace Loader { - XML::Document *getXml(const std::string &idPath) A_WARN_UNUSED; + XML::Document *getXml(const std::string &idPath, + const UseResman useResman, + const SkipError skipError) A_WARN_UNUSED; } // namespace Loader -- cgit v1.2.3-60-g2f50