mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- added a 'listall' option to FTextureManager::ListTextures, so that the multipatchtexture lookup can find multiple older versions with the same use type.
This fixes an issue with DUMP 2 which looked for patches of the same name as the texture currently being defined and where the patches had the same use type as the composite texture. The function as implemented would only find the newly added composite and print an error.
This commit is contained in:
parent
316e3395ad
commit
28fefdabc7
3 changed files with 10 additions and 7 deletions
|
@ -1324,7 +1324,7 @@ void FMultiPatchTexture::ResolvePatches()
|
|||
if (texno == id) // we found ourselves. Try looking for another one with the same name which is not a multipatch texture itself.
|
||||
{
|
||||
TArray<FTextureID> list;
|
||||
TexMan.ListTextures(Inits[i].TexName, list);
|
||||
TexMan.ListTextures(Inits[i].TexName, list, true);
|
||||
for (int i = list.Size() - 1; i >= 0; i--)
|
||||
{
|
||||
if (list[i] != id && !TexMan[list[i]]->bMultiPatch)
|
||||
|
|
|
@ -267,7 +267,7 @@ FTextureID FTextureManager::CheckForTexture (const char *name, int usetype, BITF
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list)
|
||||
int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list, bool listall)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -293,12 +293,15 @@ int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list)
|
|||
// NULL textures must be ignored.
|
||||
if (tex->UseType!=FTexture::TEX_Null)
|
||||
{
|
||||
unsigned int j;
|
||||
for(j = 0; j < list.Size(); j++)
|
||||
unsigned int j = list.Size();
|
||||
if (!listall)
|
||||
{
|
||||
for (j = 0; j < list.Size(); j++)
|
||||
{
|
||||
// Check for overriding definitions from newer WADs
|
||||
if (Textures[list[j].GetIndex()].Texture->UseType == tex->UseType) break;
|
||||
}
|
||||
}
|
||||
if (j==list.Size()) list.Push(FTextureID(i));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ public:
|
|||
|
||||
FTextureID CheckForTexture (const char *name, int usetype, BITFIELD flags=TEXMAN_TryAny);
|
||||
FTextureID GetTexture (const char *name, int usetype, BITFIELD flags=0);
|
||||
int ListTextures (const char *name, TArray<FTextureID> &list);
|
||||
int ListTextures (const char *name, TArray<FTextureID> &list, bool listall = false);
|
||||
|
||||
void AddTexturesLump (const void *lumpdata, int lumpsize, int deflumpnum, int patcheslump, int firstdup=0, bool texture1=false);
|
||||
void AddTexturesLumps (int lump1, int lump2, int patcheslump);
|
||||
|
|
Loading…
Reference in a new issue