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

Method GetTextureID

source/common/textures/texturemanager.cpp:338–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336//==========================================================================
337
338FTextureID FTextureManager::GetTextureID (const char *name, ETextureType usetype, BITFIELD flags)
339{
340 FTextureID i;
341
342 if (name == NULL || name[0] == 0)
343 {
344 return FTextureID(0);
345 }
346 else
347 {
348 i = CheckForTexture (name, usetype, flags | TEXMAN_TryAny);
349 }
350
351 if (!i.Exists())
352 {
353 // Use a default texture instead of aborting like Doom did
354 Printf ("Unknown texture: \"%s\"\n", name);
355 i = DefaultTexture;
356 }
357 return FTextureID(i);
358}
359
360//==========================================================================
361//

Callers 3

ParseGldefSkyboxMethod · 0.80
serializer.cppFile · 0.80
PMapValueReaderFunction · 0.80

Calls 4

CheckForTextureFunction · 0.85
PrintfFunction · 0.85
ExistsMethod · 0.80
FTextureIDClass · 0.70

Tested by

no test coverage detected