MCPcopy Create free account
hub / github.com/ZDoom/Raze / DEFINE_ACTION_FUNCTION

Function DEFINE_ACTION_FUNCTION

source/common/scripting/interface/vmnatives.cpp:414–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412//==========================================================================
413
414DEFINE_ACTION_FUNCTION(_TexMan, GetName)
415{
416 PARAM_PROLOGUE;
417 PARAM_INT(texid);
418 auto tex = TexMan.GameByIndex(texid);
419 FString retval;
420
421 if (tex != nullptr)
422 {
423 if (tex->GetName().IsNotEmpty()) retval = tex->GetName();
424 else
425 {
426 // Textures for full path names do not have their own name, they merely link to the source lump.
427 auto lump = tex->GetSourceLump();
428 if (TexMan.GetLinkedTexture(lump) == tex)
429 retval = fileSystem.GetFileFullName(lump);
430 }
431 }
432 ACTION_RETURN_STRING(retval);
433}
434
435static int CheckForTexture(const FString& name, int type, int flags)
436{

Callers

nothing calls this directly

Calls 15

GetTextureCanvasFunction · 0.85
GetStringFromLumpFunction · 0.85
ThrowAbortExceptionFunction · 0.85
FindCVarFunction · 0.85
I_FatalErrorFunction · 0.85
C_NameKeysFunction · 0.85
AddCommandStringFunction · 0.85
C_HideConsoleFunction · 0.85
FStringFormatFunction · 0.85
PrintfFunction · 0.85
DPrintfFunction · 0.85
GameByIndexMethod · 0.80

Tested by

no test coverage detected