- Backend update from Raze.
This commit is contained in:
parent
3ea0658449
commit
b8281f4758
21 changed files with 249 additions and 83 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue