From dbda4d0bf8c2a4329348a56521888d99eddcf87c Mon Sep 17 00:00:00 2001 From: fgenesis Date: Wed, 31 May 2023 17:13:24 +0200 Subject: [PATCH] Texture loading, part 3: Drop recache property from mod XML, this is now automatic --- Aquaria/Mod.cpp | 18 ++---------------- Aquaria/Mod.h | 1 - 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Aquaria/Mod.cpp b/Aquaria/Mod.cpp index 7c39605..b75eaa2 100644 --- a/Aquaria/Mod.cpp +++ b/Aquaria/Mod.cpp @@ -63,7 +63,6 @@ bool Mod::isShuttingDown() void Mod::clear() { active = false; - doRecache = 0; debugMenu = false; hasMap = false; blockEditor = false; @@ -133,7 +132,6 @@ void Mod::load(const std::string &p) XMLElement *props = mod->FirstChildElement("Properties"); if (props) { - props->QueryIntAttribute("recache", &doRecache); props->QueryIntAttribute("debugMenu", &debugMenu); props->QueryBoolAttribute("hasWorldMap", &hasMap); props->QueryBoolAttribute("blockEditor", &blockEditor); @@ -178,11 +176,7 @@ const std::string& Mod::getName() const void Mod::recache() { - if(doRecache) - { - core->texmgr.reloadAll(TextureMgr::KEEP_IF_SAME); - dsq->unloadResources(); - } + core->texmgr.reloadAll(TextureMgr::KEEP_IF_SAME); if(active) { @@ -193,22 +187,14 @@ void Mod::recache() fname += "precache.txt"; fname = adjustFilenameCase(fname); if (exists(fname)) - { modcache.precacheList(fname); - core->resetTimer(); - } } else { modcache.clear(); } - if(doRecache) - { - dsq->precacher.precacheList("data/precache.txt"); - dsq->reloadResources(); - core->resetTimer(); - } + core->resetTimer(); } void Mod::start() diff --git a/Aquaria/Mod.h b/Aquaria/Mod.h index 41919c8..f2ee67e 100644 --- a/Aquaria/Mod.h +++ b/Aquaria/Mod.h @@ -67,7 +67,6 @@ protected: bool active; bool hasMap; bool blockEditor; - int doRecache; int debugMenu; int enqueueModStart; void applyStart();