MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zEntGetModelParams

Function zEntGetModelParams

src/SB/Game/zEnt.cpp:727–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727xModelAssetParam* zEntGetModelParams(U32 assetID, U32* size)
728{
729 U32 bufsize;
730 void* info = xSTFindAsset(assetID, &bufsize);
731 xModelAssetInfo* minf = (xModelAssetInfo*)info;
732
733 if (minf->Magic == 0x464e494d)
734 {
735 *size = bufsize - (minf->NumModelInst * 0x38 + 0x14);
736 if (*size != 0)
737 {
738 return (xModelAssetParam*)((char*)minf + minf->NumModelInst * 0x38 + 0x14);
739 }
740 }
741 else
742 {
743 *size = 0;
744 }
745
746 return NULL;
747}
748
749char* zParamGetString(xModelAssetParam* param, U32 size, char* tok, char* def)
750{

Callers 3

load_player_iniFunction · 0.70
InitMethod · 0.70
load_settingsFunction · 0.70

Calls 1

xSTFindAssetFunction · 0.50

Tested by

no test coverage detected