1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

Texture loading, part 3: Drop recache property from mod XML, this is now automatic

This commit is contained in:
fgenesis 2023-05-31 17:13:24 +02:00
parent 7041143ef8
commit dbda4d0bf8
2 changed files with 2 additions and 17 deletions

View file

@ -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();
}
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();
}
}
void Mod::start()

View file

@ -67,7 +67,6 @@ protected:
bool active;
bool hasMap;
bool blockEditor;
int doRecache;
int debugMenu;
int enqueueModStart;
void applyStart();