summaryrefslogtreecommitdiff
path: root/src/resources/beingcommon.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-11 20:59:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-11 22:24:04 +0300
commitaf8863d722f06153877d289b939b5ba84713621d (patch)
treecbb97e2ea203d40615c49803c50b7f3c82f53ad6 /src/resources/beingcommon.h
parent0148cb8ad0e071464f09ada9eb41625dee038cb8 (diff)
downloadplus-af8863d722f06153877d289b939b5ba84713621d.tar.gz
plus-af8863d722f06153877d289b939b5ba84713621d.tar.bz2
plus-af8863d722f06153877d289b939b5ba84713621d.tar.xz
plus-af8863d722f06153877d289b939b5ba84713621d.zip
add support for map layer replacments.
This can be used for mods.
Diffstat (limited to 'src/resources/beingcommon.h')
-rw-r--r--src/resources/beingcommon.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/resources/beingcommon.h b/src/resources/beingcommon.h
index 6124de5a1..2c9741a2c 100644
--- a/src/resources/beingcommon.h
+++ b/src/resources/beingcommon.h
@@ -30,11 +30,21 @@
class BeingInfo;
#define loadXmlDir(name, function) \
- StringVect listVect; \
- BeingCommon::getIncludeFiles(paths.getStringValue( \
- name), listVect); \
- FOR_EACH (StringVectCIter, itVect, listVect) \
- function(*itVect);
+ { \
+ StringVect listVect; \
+ BeingCommon::getIncludeFiles(paths.getStringValue( \
+ name), listVect, ".xml"); \
+ FOR_EACH (StringVectCIter, itVect, listVect) \
+ function(*itVect); \
+ }
+
+#define loadXmlDir2(name, function, ext) \
+ { \
+ StringVect listVect; \
+ BeingCommon::getIncludeFiles(name, listVect, ext); \
+ FOR_EACH (StringVectCIter, itVect, listVect) \
+ function(*itVect); \
+ }
namespace BeingCommon
{
@@ -42,7 +52,9 @@ namespace BeingCommon
XmlNodePtrConst node,
const std::string &hoverCursor);
- void getIncludeFiles(const std::string &dir, StringVect &list);
+ void getIncludeFiles(const std::string &dir,
+ StringVect &list,
+ const std::string &ext);
}
#endif // RESOURCES_BEINGCOMMON_H