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

Function load_model

src/SB/Game/zEntCruiseBubble.cpp:1125–1147  ·  view source on GitHub ↗

return type guessed based on return type of zEntRecurseModelInfo and xModelInstanceAlloc

Source from the content-addressed store, hash-verified

1123
1124 // return type guessed based on return type of zEntRecurseModelInfo and xModelInstanceAlloc
1125 xModelInstance* load_model(U32 aid)
1126 {
1127 xModelInstance* model;
1128 U32 size;
1129
1130 model = (xModelInstance*)xSTFindAsset(xStrHashCat(aid, ".minf"), &size);
1131 if (model != NULL)
1132 {
1133 model = zEntRecurseModelInfo(model, NULL);
1134 return model;
1135 }
1136
1137 model = (xModelInstance*)xSTFindAsset(aid, &size);
1138 if (model == NULL)
1139 {
1140 model = (xModelInstance*)xSTFindAsset(xStrHashCat(aid, ".dff"), &size);
1141 }
1142 if (model == NULL)
1143 {
1144 return NULL;
1145 }
1146 return xModelInstanceAlloc((RpAtomic*)model, NULL, 0, 0, NULL);
1147 }
1148
1149 void render_model_2d(xModelInstance* model, const basic_rect<F32>& rect, F32 param_3)
1150 {

Callers 1

init_hudFunction · 0.70

Calls 4

zEntRecurseModelInfoFunction · 0.70
xSTFindAssetFunction · 0.50
xStrHashCatFunction · 0.50
xModelInstanceAllocFunction · 0.50

Tested by

no test coverage detected