MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FindTextureName

Function FindTextureName

Descent3/gametexture.cpp:354–369  ·  view source on GitHub ↗

Searches thru all textures for a specific name, returns -1 if not found or index of texture with name

Source from the content-addressed store, hash-verified

352// Searches thru all textures for a specific name, returns -1 if not found
353// or index of texture with name
354int FindTextureName(const char *name) {
355 int i, num_counted = 0;
356 ;
357
358 ASSERT(name != NULL);
359
360 for (i = 0; i < MAX_TEXTURES && num_counted < Num_textures; i++) {
361 if (GameTextures[i].used) {
362 num_counted++;
363 if (!stricmp(name, GameTextures[i].name))
364 return i;
365 }
366 }
367
368 return -1;
369}
370
371// Searches thru all textures for a bitmap of a specific name, returns -1 if not found
372// or index of texture with name

Callers 15

mng_RenamePageFunction · 0.85
mng_PopAddonPagesFunction · 0.85
mng_LoadNetTexturePageFunction · 0.85
mng_LoadLocalTexturePageFunction · 0.85
ReloadModelTexturesFunction · 0.85
ReadNewModelFileFunction · 0.85
RenderSubmodelFunction · 0.85
OnSelendokFft1ComboMethod · 0.85
OnSelendokFft2ComboMethod · 0.85
OnSelendokFft3ComboMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected