From b7ee14cadb1e5675f7e36565aec1fe39e55ccc34 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Jan 2014 14:47:39 +0300 Subject: add ability to inlude config parts from subdirs for items, monsters, npcs. --- src/utils/files.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/utils/files.cpp') diff --git a/src/utils/files.cpp b/src/utils/files.cpp index 72a4b2cb5..9abf13593 100644 --- a/src/utils/files.cpp +++ b/src/utils/files.cpp @@ -207,3 +207,14 @@ void Files::getFiles(const std::string &path, StringVect &list) } PhysFs::freeList(fonts); } + +void Files::getFilesWithDir(const std::string &path, StringVect &list) +{ + char **fonts = PhysFs::enumerateFiles(path.c_str()); + for (char **i = fonts; *i; i++) + { + if (!PhysFs::isDirectory((path + *i).c_str())) + list.push_back(path + *i); + } + PhysFs::freeList(fonts); +} -- cgit v1.2.3-60-g2f50