From af8863d722f06153877d289b939b5ba84713621d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Feb 2014 20:59:12 +0300 Subject: add support for map layer replacments. This can be used for mods. --- src/resources/beingcommon.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/resources/beingcommon.h') 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 -- cgit v1.2.3-60-g2f50