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:
parent
7041143ef8
commit
dbda4d0bf8
2 changed files with 2 additions and 17 deletions
|
@ -63,7 +63,6 @@ bool Mod::isShuttingDown()
|
||||||
void Mod::clear()
|
void Mod::clear()
|
||||||
{
|
{
|
||||||
active = false;
|
active = false;
|
||||||
doRecache = 0;
|
|
||||||
debugMenu = false;
|
debugMenu = false;
|
||||||
hasMap = false;
|
hasMap = false;
|
||||||
blockEditor = false;
|
blockEditor = false;
|
||||||
|
@ -133,7 +132,6 @@ void Mod::load(const std::string &p)
|
||||||
XMLElement *props = mod->FirstChildElement("Properties");
|
XMLElement *props = mod->FirstChildElement("Properties");
|
||||||
if (props)
|
if (props)
|
||||||
{
|
{
|
||||||
props->QueryIntAttribute("recache", &doRecache);
|
|
||||||
props->QueryIntAttribute("debugMenu", &debugMenu);
|
props->QueryIntAttribute("debugMenu", &debugMenu);
|
||||||
props->QueryBoolAttribute("hasWorldMap", &hasMap);
|
props->QueryBoolAttribute("hasWorldMap", &hasMap);
|
||||||
props->QueryBoolAttribute("blockEditor", &blockEditor);
|
props->QueryBoolAttribute("blockEditor", &blockEditor);
|
||||||
|
@ -178,11 +176,7 @@ const std::string& Mod::getName() const
|
||||||
|
|
||||||
void Mod::recache()
|
void Mod::recache()
|
||||||
{
|
{
|
||||||
if(doRecache)
|
core->texmgr.reloadAll(TextureMgr::KEEP_IF_SAME);
|
||||||
{
|
|
||||||
core->texmgr.reloadAll(TextureMgr::KEEP_IF_SAME);
|
|
||||||
dsq->unloadResources();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(active)
|
if(active)
|
||||||
{
|
{
|
||||||
|
@ -193,22 +187,14 @@ void Mod::recache()
|
||||||
fname += "precache.txt";
|
fname += "precache.txt";
|
||||||
fname = adjustFilenameCase(fname);
|
fname = adjustFilenameCase(fname);
|
||||||
if (exists(fname))
|
if (exists(fname))
|
||||||
{
|
|
||||||
modcache.precacheList(fname);
|
modcache.precacheList(fname);
|
||||||
core->resetTimer();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
modcache.clear();
|
modcache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doRecache)
|
core->resetTimer();
|
||||||
{
|
|
||||||
dsq->precacher.precacheList("data/precache.txt");
|
|
||||||
dsq->reloadResources();
|
|
||||||
core->resetTimer();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mod::start()
|
void Mod::start()
|
||||||
|
|
|
@ -67,7 +67,6 @@ protected:
|
||||||
bool active;
|
bool active;
|
||||||
bool hasMap;
|
bool hasMap;
|
||||||
bool blockEditor;
|
bool blockEditor;
|
||||||
int doRecache;
|
|
||||||
int debugMenu;
|
int debugMenu;
|
||||||
int enqueueModStart;
|
int enqueueModStart;
|
||||||
void applyStart();
|
void applyStart();
|
||||||
|
|
Loading…
Reference in a new issue