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

Function mng_SetAndLoadTexture

manage/texpage.cpp:920–930  ·  view source on GitHub ↗

Given a texture page, allocs a texture and calls AssignTexPageToTexture to actually load bitmaps and values. Rturns texture handle on success, -1 if fail

Source from the content-addressed store, hash-verified

918// Given a texture page, allocs a texture and calls AssignTexPageToTexture to actually
919// load bitmaps and values. Rturns texture handle on success, -1 if fail
920int mng_SetAndLoadTexture(mngs_texture_page *texpage, CFILE *infile) {
921 int n;
922
923 n = AllocTexture();
924 if (n < 0)
925 return -1;
926 if (!mng_AssignTexPageToTexture(texpage, n, infile))
927 return -1;
928
929 return n;
930}
931
932// extern char Texture256Names[][80];
933// extern int Num_256s;

Callers 3

mng_LoadNetTexturePageFunction · 0.85
mng_LoadLocalTexturePageFunction · 0.85

Calls 2

AllocTextureFunction · 0.85

Tested by

no test coverage detected