feat: DLC world folder support

This commit is contained in:
Fireblade
2026-05-12 22:11:26 -04:00
parent 00a3be0630
commit 15e4da3308
31 changed files with 60 additions and 19 deletions
+10 -2
View File
@@ -200,6 +200,8 @@ void PreStitchedTextureMap::stitch()
void PreStitchedTextureMap::makeTextureAnimated(TexturePack *texturePack, StitchedTexture *tex)
{
if(!tex->hasOwnData())
{
animatedTextures.push_back(tex);
@@ -212,15 +214,18 @@ void PreStitchedTextureMap::makeTextureAnimated(TexturePack *texturePack, Stitch
if(!animString.empty())
{
wstring filename = path + textureFileName + extension;
// TODO: [EB] Put the frames into a proper object, not this inside out hack
vector<Texture *> *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap);
vector<Texture *> *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap, true);
if (frames == nullptr || frames->empty())
{
return; // Couldn't load a texture, skip it
}
Texture *first = frames->at(0);
#ifndef _CONTENT_PACKAGE
@@ -259,7 +264,10 @@ void PreStitchedTextureMap::cycleAnimationFrames()
{
for(StitchedTexture* texture : animatedTextures)
{
texture->cycleFrames();
if (texture != nullptr && texture->getFrames() > 0)
{
texture->cycleFrames();
}
}
}