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

Function xSTFindAsset

src/SB/Core/x/xstransvc.cpp:268–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268void* xSTFindAsset(U32 aid, U32* size)
269{
270 void* memloc = NULL;
271 if (aid == 0)
272 {
273 return memloc;
274 }
275
276 S32 ready;
277 S32 scncount = XST_cnt_locked();
278 for (S32 i = 0; i < scncount; i++)
279 {
280 st_STRAN_SCENE* sdata = XST_nth_locked(i);
281 if (g_pkrf->PkgHasAsset(sdata->spkg, aid))
282 {
283 memloc = g_pkrf->LoadAsset(sdata->spkg, aid, NULL, NULL);
284 if (!g_pkrf->IsAssetReady(sdata->spkg, aid))
285 {
286 memloc = NULL;
287 if (size != NULL)
288 {
289 *size = 0;
290 }
291 }
292 else
293 {
294 if (size != NULL)
295 {
296 *size = g_pkrf->GetAssetSize(sdata->spkg, aid);
297 }
298 }
299 break;
300 }
301 }
302 return memloc;
303}
304
305S32 xSTAssetCountByType(U32 type)
306{

Callers 15

xBoulderGenerator_InitFunction · 0.70
xShadowSimple_CacheInitFunction · 0.70
xShadowSimple_InitFunction · 0.70
xScrFXGlareAddFunction · 0.70
xCameraResetFunction · 0.70
xParSysSetupFunction · 0.70
zEntEventFunction · 0.70
setupMethod · 0.70
DrawRingSetupFunction · 0.70
xFX_SceneEnterFunction · 0.70
xFXAtomicEnvMapSetupFunction · 0.70

Calls 2

XST_cnt_lockedFunction · 0.85
XST_nth_lockedFunction · 0.85

Tested by

no test coverage detected