diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-14 22:41:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-14 22:41:07 +0300 |
commit | 56d6454ba617d1dcddbbaa21e2066a7db0caee75 (patch) | |
tree | 5012e55f393db2d62b40eb64142fa4317b16c571 /src/resources | |
parent | bdec92381ef60cd027292ed63e254e8de70028d9 (diff) | |
download | manaplus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.tar.gz manaplus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.tar.bz2 manaplus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.tar.xz manaplus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.zip |
Move some virtfs replated functions from files.cpp into virtfstools.cpp
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/beingcommon.h | 7 | ||||
-rw-r--r-- | src/resources/db/badgesdb.cpp | 8 | ||||
-rw-r--r-- | src/resources/db/colordb.cpp | 2 | ||||
-rw-r--r-- | src/resources/db/itemdb.cpp | 4 | ||||
-rw-r--r-- | src/resources/db/palettedb.cpp | 4 |
5 files changed, 14 insertions, 11 deletions
diff --git a/src/resources/beingcommon.h b/src/resources/beingcommon.h index 87f7b8088..2b3d8c230 100644 --- a/src/resources/beingcommon.h +++ b/src/resources/beingcommon.h @@ -21,7 +21,8 @@ #ifndef RESOURCES_BEINGCOMMON_H #define RESOURCES_BEINGCOMMON_H -#include "utils/files.h" +#include "utils/stringvector.h" +#include "utils/virtfstools.h" #include "utils/xml.h" #include "localconsts.h" @@ -33,7 +34,7 @@ struct SpriteDisplay; #define loadXmlDir(name, function) \ { \ StringVect listVect; \ - Files::getFilesInDir(paths.getStringValue( \ + VirtFs::getFilesInDir(paths.getStringValue( \ name), listVect, ".xml"); \ FOR_EACH (StringVectCIter, itVect, listVect) \ function(*itVect, SkipError_true); \ @@ -42,7 +43,7 @@ struct SpriteDisplay; #define loadXmlDir2(name, function, ext, skipError) \ { \ StringVect listVect; \ - Files::getFilesInDir(name, listVect, ext); \ + VirtFs::getFilesInDir(name, listVect, ext); \ FOR_EACH (StringVectCIter, itVect, listVect) \ function(*itVect, skipError); \ } diff --git a/src/resources/db/badgesdb.cpp b/src/resources/db/badgesdb.cpp index 9e7a7fad4..031d78945 100644 --- a/src/resources/db/badgesdb.cpp +++ b/src/resources/db/badgesdb.cpp @@ -22,7 +22,7 @@ #include "configuration.h" -#include "utils/files.h" +#include "utils/virtfstools.h" #include "utils/xmlutils.h" #include "debug.h" @@ -58,8 +58,10 @@ static void loadDB(const std::string &name, BadgesInfos &arr) name, arr, SkipError_true); StringVect listVect; - Files::getFilesInDir(paths.getStringValue( - "badgesPatchDir"), listVect, ".xml"); + VirtFs::getFilesInDir(paths.getStringValue( + "badgesPatchDir"), + listVect, + ".xml"); FOR_EACH (StringVectCIter, itVect, listVect) loadXmlFile(*itVect, name, arr, SkipError_true); } diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp index 0d268c78a..90e1436ac 100644 --- a/src/resources/db/colordb.cpp +++ b/src/resources/db/colordb.cpp @@ -53,7 +53,7 @@ void ColorDB::load() colors, SkipError_true); StringVect list; - Files::getFilesInDir(paths.getStringValue( + VirtFs::getFilesInDir(paths.getStringValue( "hairColorPatchDir"), list, ".xml"); FOR_EACH (StringVectCIter, it2, list) loadHair(*it2, colors, SkipError_true); diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 482ec005d..9ff9d78c6 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -42,8 +42,8 @@ #include "utils/checkutils.h" #include "utils/delete2.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/stringmap.h" +#include "utils/virtfstools.h" #include "debug.h" @@ -202,7 +202,7 @@ void ItemDB::load() SkipError_true); StringVect list; - Files::getFilesInDir(paths.getStringValue("itemsPatchDir"), + VirtFs::getFilesInDir(paths.getStringValue("itemsPatchDir"), list, ".xml"); FOR_EACH (StringVectCIter, it, list) diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index 75d8be290..4c9c4cd76 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -23,7 +23,7 @@ #include "configuration.h" #include "utils/checkutils.h" -#include "utils/files.h" +#include "utils/virtfstools.h" #include "resources/dye/dyecolor.h" @@ -47,7 +47,7 @@ void PaletteDB::loadPalette() { mLoaded = true; StringVect lines; - Files::loadTextFile(paths.getStringValue("palettesDir") + + VirtFs::loadTextFile(paths.getStringValue("palettesDir") + paths.getStringValue("defaultPaletteFile"), lines); StringVectCIter it = lines.begin(); |