- Backend update from Raze.

This commit is contained in:
Christoph Oelckers 2020-10-07 16:00:39 +02:00
commit b8281f4758
21 changed files with 249 additions and 83 deletions

View file

@ -265,6 +265,11 @@ FTextureID FTextureManager::CheckForTexture (const char *name, ETextureType uset
}
}
}
if (!(flags & TEXMAN_NoAlias))
{
int* alias = aliases.CheckKey(name);
if (alias) return FTextureID(*alias);
}
return FTextureID(-1);
}
@ -1539,6 +1544,19 @@ void FTextureManager::SetTranslation(FTextureID fromtexnum, FTextureID totexnum)
}
//-----------------------------------------------------------------------------
//
// Adds an alias name to the texture manager.
// Aliases are only checked if no real texture with the given name exists.
//
//-----------------------------------------------------------------------------
void FTextureManager::AddAlias(const char* name, FGameTexture* tex)
{
FTextureID id = tex->GetID();
if (tex != Textures[id.GetIndex()].Texture || !tex->isValid()) return; // Whatever got passed in here was not valid, so ignore the alias.
aliases.Insert(name, id.GetIndex());
}
//==========================================================================
//