mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-24 16:08:43 +00:00
Load folder texture packs
This commit is contained in:
parent
66343a5ba1
commit
caaca129ad
|
|
@ -249,7 +249,19 @@ void TexturePackRepository::updateList()
|
|||
}
|
||||
}
|
||||
else if (file->isDirectory()) {
|
||||
app.DebugPrintf("Found texture pack folder! %s", name);
|
||||
app.DebugPrintf("Found folder texture pack! %s", name.c_str());
|
||||
DWORD id = 0;
|
||||
for (int i = 0; i < INT_MAX; i++)
|
||||
if (cacheById.find(i) == cacheById.end()) {
|
||||
id = i;
|
||||
break;
|
||||
}
|
||||
|
||||
FolderTexturePack* tp = new FolderTexturePack(id, file->getName(), file, DEFAULT_TEXTURE_PACK);
|
||||
if (tp->hasData()) {
|
||||
texturePacks->push_back(tp);
|
||||
cacheById[id] = tp;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (exception e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue