diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-28 02:06:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-28 02:06:49 +0300 |
commit | fac5f4d0cf2181f88629b6a21c7d433217da90ca (patch) | |
tree | d2f50084e11d501f78fee4a268a6a288b8bd3236 /src | |
parent | 3fba07dba53ae41d915ba4c3304e31f0b44893fa (diff) | |
download | manaverse-fac5f4d0cf2181f88629b6a21c7d433217da90ca.tar.gz manaverse-fac5f4d0cf2181f88629b6a21c7d433217da90ca.tar.bz2 manaverse-fac5f4d0cf2181f88629b6a21c7d433217da90ca.tar.xz manaverse-fac5f4d0cf2181f88629b6a21c7d433217da90ca.zip |
Rename UseResMan into UseVirtFs.
Diffstat (limited to 'src')
50 files changed, 76 insertions, 76 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7c4259a1e..5eb5c2c91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1337,7 +1337,7 @@ SET(SRCS enums/simpletypes/tryremovecolors.h enums/simpletypes/useargs.h enums/simpletypes/usebase64.h - enums/simpletypes/useresman.h + enums/simpletypes/usevirtfs.h enums/simpletypes/visible.h statuseffect.cpp statuseffect.h diff --git a/src/Makefile.am b/src/Makefile.am index 174606bba..57b264163 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -787,7 +787,7 @@ BASE_SRC += events/actionevent.h \ enums/simpletypes/tryremovecolors.h \ enums/simpletypes/useargs.h \ enums/simpletypes/usebase64.h \ - enums/simpletypes/useresman.h \ + enums/simpletypes/usevirtfs.h \ enums/simpletypes/visible.h \ render/surfacegraphics.cpp \ render/surfacegraphics.h \ diff --git a/src/client.cpp b/src/client.cpp index bb7c8e687..b7f62415b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1327,7 +1327,7 @@ int Client::gameExec() } logger->log("Init paths"); - paths.init("paths.xml", UseResman_true); + paths.init("paths.xml", UseVirtFs_true); paths.setDefaultValues(getPathsDefaults()); initPaths(); if (!SpriteReference::Empty) @@ -1857,7 +1857,7 @@ void Client::action(const ActionEvent &event) void Client::initFeatures() { features.init(paths.getStringValue("featuresFile"), - UseResman_true, + UseVirtFs_true, SkipError_true); features.setDefaultValues(getFeaturesDefaults()); settings.fixDeadAnimation = features.getBoolValue("fixDeadAnimation"); diff --git a/src/configuration.cpp b/src/configuration.cpp index bcf461892..0778d2101 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -362,7 +362,7 @@ Configuration::Configuration() : mDefaultsData(nullptr), mDirectory(), mFilename(), - mUseResManager(UseResman_false), + mUseResManager(UseVirtFs_false), mUpdated(false) { #ifdef DEBUG_CONFIG @@ -397,7 +397,7 @@ void Configuration::unload() mConfigPath.clear(); mDirectory.clear(); mFilename.clear(); - mUseResManager = UseResman_false; + mUseResManager = UseVirtFs_false; ConfigurationObject::clear(); } @@ -739,7 +739,7 @@ void ConfigurationObject::initFromXML(const XmlNodePtrConst parentNode) } void Configuration::init(const std::string &filename, - const UseResman useResManager, + const UseVirtFs useResManager, const SkipError skipError) { cleanDefaults(); @@ -749,7 +749,7 @@ void Configuration::init(const std::string &filename, mFilename = filename; mUseResManager = useResManager; - if (useResManager == UseResman_true) + if (useResManager == UseVirtFs_true) { mConfigPath = "PhysFS://" + filename; mDirectory.clear(); diff --git a/src/configuration.h b/src/configuration.h index 111f85d63..9e46221b8 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -248,7 +248,7 @@ class Configuration final : public ConfigurationObject * @param useResManager Make use of the resource manager. */ void init(const std::string &filename, - const UseResman useResManager = UseResman_false, + const UseVirtFs useResManager = UseVirtFs_false, const SkipError skipError = SkipError_false); void reInit(); @@ -383,7 +383,7 @@ class Configuration final : public ConfigurationObject DefaultsData *mDefaultsData; std::string mDirectory; std::string mFilename; - UseResman mUseResManager; + UseVirtFs mUseResManager; bool mUpdated; }; diff --git a/src/dyetool/client.cpp b/src/dyetool/client.cpp index 6e206de7f..a402fc6f9 100644 --- a/src/dyetool/client.cpp +++ b/src/dyetool/client.cpp @@ -650,7 +650,7 @@ int Client::gameExec() } logger->log("Init paths"); - paths.init("paths.xml", UseResman_true); + paths.init("paths.xml", UseVirtFs_true); paths.setDefaultValues(getPathsDefaults()); initPaths(); TranslationManager::loadCurrentLang(); diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index 32d441b31..875deb36a 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -50,7 +50,7 @@ EffectManager::EffectManager() : void EffectManager::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst root = doc.rootNode(); if (!root || diff --git a/src/enums/simpletypes/useresman.h b/src/enums/simpletypes/usevirtfs.h index b0239596d..f76e3e55b 100644 --- a/src/enums/simpletypes/useresman.h +++ b/src/enums/simpletypes/usevirtfs.h @@ -26,7 +26,7 @@ PRAGMA6(GCC diagnostic push) PRAGMA6(GCC diagnostic ignored "-Wunused-const-variable") -defBoolEnum(UseResman); +defBoolEnum(UseVirtFs); PRAGMA6(GCC diagnostic pop) diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 206d8f9a5..5be8efbf9 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -402,7 +402,7 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) if (!VirtFs::exists(path)) return nullptr; XML::Document *const doc = Loader::getXml(path, - UseResman_true, + UseVirtFs_true, SkipError_true); if (!doc) return nullptr; @@ -1007,7 +1007,7 @@ void Theme::loadColors(std::string file) file.append("/colors.xml"); XML::Document *const doc = Loader::getXml(resolveThemePath(file), - UseResman_true, + UseVirtFs_true, SkipError_false); if (!doc) return; @@ -1216,7 +1216,7 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName) } logger->log("loading: " + path); XML::Document *const doc = Loader::getXml(path, - UseResman_true, + UseVirtFs_true, SkipError_false); if (!doc) return nullptr; diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index 192d03dc1..1910bb8e1 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -628,7 +628,7 @@ void EquipmentWindow::fillBoxes() { XML::Document *const doc = new XML::Document( paths.getStringValue("equipmentWindowFile"), - UseResman_true, + UseVirtFs_true, SkipError_false); const XmlNodePtr root = doc->rootNode(); if (!root) @@ -737,7 +737,7 @@ void EquipmentWindow::prepareSlotNames() { mSlotNames.clear(); XML::Document doc(paths.getStringValue("equipmentSlotsFile"), - UseResman_true, + UseVirtFs_true, SkipError_false); const XmlNodePtrConst root = doc.rootNode(); if (!root) diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index c4f65d770..e1fe669ee 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -480,7 +480,7 @@ void ServerDialog::loadServers(const bool addNew) { XML::Document doc(std::string(mDir).append("/").append( branding.getStringValue("onlineServerFile")), - UseResman_false, + UseVirtFs_false, SkipError_false); const XmlNodePtr rootNode = doc.rootNode(); diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 64d05b042..eec6a2ac5 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -316,7 +316,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); XmlNodePtrConst root = doc.rootNode(); diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index ef4b543a1..192d55dc5 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -78,7 +78,7 @@ static std::vector<UpdateFile> loadXMLFile(const std::string &fileName, const bool loadMods) { std::vector<UpdateFile> files; - XML::Document doc(fileName, UseResman_false, SkipError_false); + XML::Document doc(fileName, UseVirtFs_false, SkipError_false); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "updates")) diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 5fd68f878..1931e9b03 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -413,7 +413,7 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile, const std::string dyePalettes = (pos != std::string::npos) ? particleEffectFile.substr(pos + 1) : ""; XML::Document *doc = Loader::getXml(particleEffectFile.substr(0, pos), - UseResman_true, + UseVirtFs_true, SkipError_false); if (!doc) return nullptr; diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp index 5150aee3b..f4ac7f8d3 100644 --- a/src/particle/particleengine.cpp +++ b/src/particle/particleengine.cpp @@ -137,7 +137,7 @@ Particle *ParticleEngine::addEffect(const std::string &restrict ? particleEffectFile.substr(pos + 1) : ""; XML::Document *doc = Loader::getXml( particleEffectFile.substr(0, pos), - UseResman_true, + UseVirtFs_true, SkipError_false); if (!doc) return nullptr; diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp index b14f8fff6..8af32cd6c 100644 --- a/src/resources/db/avatardb.cpp +++ b/src/resources/db/avatardb.cpp @@ -55,7 +55,7 @@ void AvatarDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); diff --git a/src/resources/db/chardb.cpp b/src/resources/db/chardb.cpp index 96372dfc8..eb96538c5 100644 --- a/src/resources/db/chardb.cpp +++ b/src/resources/db/chardb.cpp @@ -50,7 +50,7 @@ void CharDB::load() XML::Document *doc = new XML::Document( paths.getStringValue("charCreationFile"), - UseResman_true, + UseVirtFs_true, SkipError_false); const XmlNodePtrConst root = doc->rootNode(); diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp index 90e1436ac..9261e8a76 100644 --- a/src/resources/db/colordb.cpp +++ b/src/resources/db/colordb.cpp @@ -79,7 +79,7 @@ void ColorDB::loadHair(const std::string &fileName, const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); @@ -125,7 +125,7 @@ void ColorDB::loadColorLists(const std::string &fileName, const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); if (!root) diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp index 422fdbeda..2338287c2 100644 --- a/src/resources/db/commandsdb.cpp +++ b/src/resources/db/commandsdb.cpp @@ -61,7 +61,7 @@ static CommandTargetT parseTarget(const std::string &text) void CommandsDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "commands")) diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp index 2d9293e0f..eddc4ff42 100644 --- a/src/resources/db/deaddb.cpp +++ b/src/resources/db/deaddb.cpp @@ -50,7 +50,7 @@ void DeadDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); diff --git a/src/resources/db/elementaldb.cpp b/src/resources/db/elementaldb.cpp index 90b1e5943..21788b08e 100644 --- a/src/resources/db/elementaldb.cpp +++ b/src/resources/db/elementaldb.cpp @@ -54,7 +54,7 @@ void ElementalDb::load() void ElementalDb::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "elementals")) diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index f8522be86..8fddc0a19 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -72,7 +72,7 @@ void EmoteDB::load() void EmoteDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "emotes")) @@ -149,7 +149,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName, void EmoteDB::loadSpecialXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "emotes")) diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp index 342824e30..77c1b4323 100644 --- a/src/resources/db/homunculusdb.cpp +++ b/src/resources/db/homunculusdb.cpp @@ -55,7 +55,7 @@ void HomunculusDB::load() void HomunculusDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "homunculuses")) diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp index 44c4d02bf..1eab6ada7 100644 --- a/src/resources/db/horsedb.cpp +++ b/src/resources/db/horsedb.cpp @@ -149,7 +149,7 @@ void HorseDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); XmlNodePtrConst rootNode = doc.rootNode(); diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 06ce15542..e347528eb 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -241,7 +241,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, } XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); diff --git a/src/resources/db/itemfielddb.cpp b/src/resources/db/itemfielddb.cpp index 0eeb7f901..6ba76db2c 100644 --- a/src/resources/db/itemfielddb.cpp +++ b/src/resources/db/itemfielddb.cpp @@ -103,7 +103,7 @@ void ItemFieldDb::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp index cbac91e9d..b9c6818b3 100644 --- a/src/resources/db/mapdb.cpp +++ b/src/resources/db/mapdb.cpp @@ -63,7 +63,7 @@ void MapDB::loadRemapXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document *const doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); @@ -151,7 +151,7 @@ void MapDB::loadInfo(const std::string &fileName, const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); if (!root) diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp index 90c547208..0e2fdcae0 100644 --- a/src/resources/db/mercenarydb.cpp +++ b/src/resources/db/mercenarydb.cpp @@ -56,7 +56,7 @@ void MercenaryDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtr rootNode = doc.rootNode(); diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp index c79b37800..4e67cb612 100644 --- a/src/resources/db/moddb.cpp +++ b/src/resources/db/moddb.cpp @@ -51,7 +51,7 @@ void ModDB::load() void ModDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "mods")) diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp index 2cb5a6a0e..2c87f19f8 100644 --- a/src/resources/db/monsterdb.cpp +++ b/src/resources/db/monsterdb.cpp @@ -59,7 +59,7 @@ void MonsterDB::load() void MonsterDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "monsters")) diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index 4e5fd35fe..9c77950b7 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -60,7 +60,7 @@ void NPCDB::load() void NPCDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "npcs")) diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp index fcd4504c0..6ab48e4bd 100644 --- a/src/resources/db/npcdialogdb.cpp +++ b/src/resources/db/npcdialogdb.cpp @@ -151,7 +151,7 @@ void NpcDialogDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document *const doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index 1a6e6e5cd..d3d166675 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -57,7 +57,7 @@ void PETDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp index 89228f038..c28c9c278 100644 --- a/src/resources/db/questdb.cpp +++ b/src/resources/db/questdb.cpp @@ -178,7 +178,7 @@ void QuestDb::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc.rootNode(); if (!root) diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp index b0a465ec4..8beae1ac2 100644 --- a/src/resources/db/skillunitdb.cpp +++ b/src/resources/db/skillunitdb.cpp @@ -56,7 +56,7 @@ void SkillUnitDb::load() void SkillUnitDb::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "skillunits")) diff --git a/src/resources/db/sounddb.cpp b/src/resources/db/sounddb.cpp index ace3924bc..a62045505 100644 --- a/src/resources/db/sounddb.cpp +++ b/src/resources/db/sounddb.cpp @@ -47,7 +47,7 @@ void SoundDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst root = doc->rootNode(); diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp index d4424b6e2..e2d4292a1 100644 --- a/src/resources/db/statdb.cpp +++ b/src/resources/db/statdb.cpp @@ -171,7 +171,7 @@ void StatDb::loadXmlFile(const std::string &fileName, const SkipError skipError) { XML::Document doc(fileName, - UseResman_true, + UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); diff --git a/src/resources/db/statuseffectdb.cpp b/src/resources/db/statuseffectdb.cpp index a535da534..fea06230e 100644 --- a/src/resources/db/statuseffectdb.cpp +++ b/src/resources/db/statuseffectdb.cpp @@ -87,7 +87,7 @@ void StatusEffectDB::load() void StatusEffectDB::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "status-effects")) diff --git a/src/resources/db/unitsdb.cpp b/src/resources/db/unitsdb.cpp index 37c516390..0c06f6a4c 100644 --- a/src/resources/db/unitsdb.cpp +++ b/src/resources/db/unitsdb.cpp @@ -190,7 +190,7 @@ static void loadCurrencies(XmlNodePtr parentNode) void UnitsDb::loadXmlFile(const std::string &fileName, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst root = doc.rootNode(); if (!root || !xmlNameEqual(root, "units")) diff --git a/src/resources/loaders/xmlloader.cpp b/src/resources/loaders/xmlloader.cpp index 647b45664..ac005bc06 100644 --- a/src/resources/loaders/xmlloader.cpp +++ b/src/resources/loaders/xmlloader.cpp @@ -35,7 +35,7 @@ namespace A_DEFAULT_COPY(ResourceLoader) const std::string path; - const UseResman useResman; + const UseVirtFs useResman; const SkipError skipError; static Resource *load(const void *const v) @@ -54,7 +54,7 @@ namespace } // namespace XML::Document *Loader::getXml(const std::string &idPath, - const UseResman useResman, + const UseVirtFs useResman, const SkipError skipError) { ResourceLoader rl = { idPath, useResman, skipError }; diff --git a/src/resources/loaders/xmlloader.h b/src/resources/loaders/xmlloader.h index d222f1c17..a52186daa 100644 --- a/src/resources/loaders/xmlloader.h +++ b/src/resources/loaders/xmlloader.h @@ -30,7 +30,7 @@ namespace Loader { XML::Document *getXml(const std::string &idPath, - const UseResman useResman, + const UseVirtFs useResman, const SkipError skipError) A_WARN_UNUSED; } // namespace Loader diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index bf0b95f71..59ddaddb7 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -226,7 +226,7 @@ void MapReader::addLayerToList(const std::string &fileName, const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, - UseResman_true, + UseVirtFs_true, skipError); XmlNodePtrConst node = doc->rootNode(); if (!node) @@ -259,7 +259,7 @@ Map *MapReader::readMap(const std::string &restrict filename, BLOCK_START("MapReader::readMap str") logger->log("Attempting to read map %s", realFilename.c_str()); - XML::Document doc(realFilename, UseResman_true, SkipError_false); + XML::Document doc(realFilename, UseVirtFs_true, SkipError_false); if (!doc.isLoaded()) { BLOCK_END("MapReader::readMap str") @@ -1070,7 +1070,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, std::string filename = XML::getProperty(node, "source", ""); filename = resolveRelativePath(path, filename); - doc = new XML::Document(filename, UseResman_true, SkipError_false); + doc = new XML::Document(filename, UseVirtFs_true, SkipError_false); node = doc->rootNode(); if (!node) { diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp index b5af1f057..544729d6a 100644 --- a/src/resources/sprite/spritedef.cpp +++ b/src/resources/sprite/spritedef.cpp @@ -95,7 +95,7 @@ SpriteDef *SpriteDef::load(const std::string &animationFile, palettes = animationFile.substr(pos + 1); XML::Document *const doc = Loader::getXml(animationFile.substr(0, pos), - UseResman_true, + UseVirtFs_true, SkipError_false); if (!doc) return nullptr; @@ -489,7 +489,7 @@ void SpriteDef::includeSprite(const XmlNodePtr includeNode, const int variant) mProcessedFiles.insert(filename); XML::Document *const doc = Loader::getXml(filename, - UseResman_true, + UseVirtFs_true, SkipError_false); if (!doc) return; diff --git a/src/utils/xml/libxml.cpp b/src/utils/xml/libxml.cpp index 8b5b34efc..f6e38f08f 100644 --- a/src/utils/xml/libxml.cpp +++ b/src/utils/xml/libxml.cpp @@ -81,7 +81,7 @@ static void xmlErrorLogger(void *ctx A_UNUSED, const char *msg, ...) namespace XML { Document::Document(const std::string &filename, - const UseResman useResman, + const UseVirtFs useResman, const SkipError skipError) : Resource(), mDoc(nullptr), @@ -96,7 +96,7 @@ namespace XML int size = 0; char *data = nullptr; valid = true; - if (useResman == UseResman_true) + if (useResman == UseVirtFs_true) { data = static_cast<char*>(VirtFs::loadFile( filename.c_str(), size)); diff --git a/src/utils/xml/libxml.h b/src/utils/xml/libxml.h index f1c192072..9ef419121 100644 --- a/src/utils/xml/libxml.h +++ b/src/utils/xml/libxml.h @@ -28,7 +28,7 @@ #define XML_INCLUDE_DEFINE #include "enums/simpletypes/skiperror.h" -#include "enums/simpletypes/useresman.h" +#include "enums/simpletypes/usevirtfs.h" #include "utils/xml/libxml.inc" @@ -57,7 +57,7 @@ namespace XML * resource manager. Logs errors. */ Document(const std::string &filename, - const UseResman useResman, + const UseVirtFs useResman, const SkipError skipError); /** diff --git a/src/utils/xml/pugixml.cpp b/src/utils/xml/pugixml.cpp index 47d6b25de..8d5e8db59 100644 --- a/src/utils/xml/pugixml.cpp +++ b/src/utils/xml/pugixml.cpp @@ -58,7 +58,7 @@ namespace XML } Document::Document(const std::string &filename, - const UseResman useResman, + const UseVirtFs useResman, const SkipError skipError) : Resource(), mDoc(), @@ -74,7 +74,7 @@ namespace XML int size = 0; char *data = nullptr; valid = true; - if (useResman == UseResman_true) + if (useResman == UseVirtFs_true) { data = static_cast<char*>(VirtFs::loadFile( filename.c_str(), size)); diff --git a/src/utils/xml/pugixml.h b/src/utils/xml/pugixml.h index 3f2556c16..b6d9e5bfd 100644 --- a/src/utils/xml/pugixml.h +++ b/src/utils/xml/pugixml.h @@ -28,7 +28,7 @@ #define XML_INCLUDE_DEFINE #include "enums/simpletypes/skiperror.h" -#include "enums/simpletypes/useresman.h" +#include "enums/simpletypes/usevirtfs.h" #include "utils/xml/pugixml.inc" @@ -57,7 +57,7 @@ namespace XML * resource manager. Logs errors. */ Document(const std::string &filename, - const UseResman useResman, + const UseVirtFs useResman, const SkipError skipError); /** diff --git a/src/utils/xml/pugixmlwriter.h b/src/utils/xml/pugixmlwriter.h index 3d6712992..fe5977655 100644 --- a/src/utils/xml/pugixmlwriter.h +++ b/src/utils/xml/pugixmlwriter.h @@ -24,7 +24,7 @@ #ifdef ENABLE_PUGIXML #include "enums/simpletypes/skiperror.h" -#include "enums/simpletypes/useresman.h" +#include "enums/simpletypes/usevirtfs.h" #include "utils/xml/pugixml.h" diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc index 795cd2fa0..fc40f4439 100644 --- a/src/utils/xml_unittest.cc +++ b/src/utils/xml_unittest.cc @@ -75,7 +75,7 @@ TEST_CASE("xml doc") SECTION("load1") { XML::Document doc("graphics/gui/browserbox.xml", - UseResman_true, + UseVirtFs_true, SkipError_false); REQUIRE(doc.isLoaded() == true); REQUIRE(doc.isValid() == true); @@ -140,7 +140,7 @@ TEST_CASE("xml doc") SECTION("properties") { XML::Document doc("graphics/gui/browserbox.xml", - UseResman_true, + UseVirtFs_true, SkipError_false); const XmlNodePtr rootNode = doc.rootNode(); @@ -150,7 +150,7 @@ TEST_CASE("xml doc") SECTION("for each") { XML::Document doc("graphics/gui/browserbox.xml", - UseResman_true, + UseVirtFs_true, SkipError_false); const XmlNodePtr rootNode = doc.rootNode(); @@ -190,7 +190,7 @@ TEST_CASE("xml doc") SECTION("child1") { XML::Document doc("graphics/gui/browserbox.xml", - UseResman_true, + UseVirtFs_true, SkipError_false); const XmlNodePtr rootNode = doc.rootNode(); @@ -294,7 +294,7 @@ TEST_CASE("xml doc") // load XML::Document doc(tempXmlName, - UseResman_false, + UseVirtFs_false, SkipError_false); REQUIRE(doc.isLoaded() == true); REQUIRE(doc.isValid() == true); @@ -334,7 +334,7 @@ TEST_CASE("xml doc") // load XML::Document doc(tempXmlName, - UseResman_false, + UseVirtFs_false, SkipError_false); REQUIRE(doc.isLoaded() == true); REQUIRE(doc.isValid() == true); diff --git a/src/utils/xmlutils.cpp b/src/utils/xmlutils.cpp index f0bfb8b4d..450a392d4 100644 --- a/src/utils/xmlutils.cpp +++ b/src/utils/xmlutils.cpp @@ -34,7 +34,7 @@ void readXmlIntVector(const std::string &fileName, std::vector<int> &arr, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, rootName.c_str())) @@ -85,7 +85,7 @@ void readXmlStringMap(const std::string &fileName, std::map<std::string, std::string> &arr, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, rootName.c_str())) @@ -139,7 +139,7 @@ void readXmlIntMap(const std::string &fileName, std::map<int32_t, int32_t> &arr, const SkipError skipError) { - XML::Document doc(fileName, UseResman_true, skipError); + XML::Document doc(fileName, UseVirtFs_true, skipError); const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, rootName.c_str())) |