Added ability to get texture name from script
Use TexMan.GetName(TextureID tex) member function
This commit is contained in:
parent
714259d715
commit
f40a31409d
2 changed files with 15 additions and 0 deletions
|
|
@ -1202,6 +1202,20 @@ int FTextureManager::CountLumpTextures (int lumpnum)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_TexMan, GetName)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(texid);
|
||||
const FTexture* const tex = TexMan.ByIndex(texid);
|
||||
ACTION_RETURN_STRING(nullptr == tex ? FString() : tex->Name);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_TexMan, GetSize)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue