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

Function zSceneInitFunc_Dispatcher

src/SB/Game/zScene.cpp:668–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668static U32 zSceneInitFunc_Dispatcher(zScene* s, zSceneObjectInstanceDesc* desc, U32 base_idx)
669{
670 S32 count;
671
672 count = s->baseCount[desc->baseType];
673
674 if (count)
675 {
676 st_ZDISPATCH_DATA* dpat_pool = zDispatcher_memPool(count);
677 s->baseList[desc->baseType] = dpat_pool;
678
679 for (S32 idx = 0; idx < count; idx++)
680 {
681 xBase* b = zDispatcher_getInst(dpat_pool, idx);
682 xEntAsset* asset = (xEntAsset*)xSTFindAssetByType('DPAT', idx, NULL);
683
684 zSceneSet(b, base_idx);
685 zDispatcher_Init((st_ZDISPATCH_DATA*)b, asset);
686 zSceneObjHashtableAdd(b->id, b);
687
688 base_idx++;
689 }
690 }
691
692 return base_idx;
693}
694
695void zSceneSet(xBase* b, U32 index)
696{

Callers

nothing calls this directly

Calls 6

zDispatcher_getInstFunction · 0.85
zSceneSetFunction · 0.85
zDispatcher_InitFunction · 0.85
zDispatcher_memPoolFunction · 0.70
zSceneObjHashtableAddFunction · 0.70
xSTFindAssetByTypeFunction · 0.50

Tested by

no test coverage detected