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

Function zSceneInitFunc_MovePoint

src/SB/Game/zScene.cpp:458–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458static U32 zSceneInitFunc_MovePoint(zScene* s, zSceneObjectInstanceDesc* desc, U32 base_idx)
459{
460 S32 count;
461 U32 assetSize;
462 zMovePoint* movpBlock;
463
464 assetSize = 0;
465 count = s->baseCount[desc->baseType];
466 movpBlock = zMovePoint_GetMemPool(count);
467
468 if (movpBlock)
469 {
470 s->baseList[desc->baseType] = movpBlock;
471
472 for (S32 idx = 0; idx < count; idx++)
473 {
474 xBase* b = zMovePoint_GetInst(idx);
475 xBaseAsset* basset = (xBaseAsset*)xSTFindAssetByType('MVPT', idx, &assetSize);
476
477 zSceneSet(b, base_idx);
478 zMovePointInit(zMovePoint_GetInst(idx), (xMovePointAsset*)basset);
479 zSceneObjHashtableAdd(b->id, b);
480
481 base_idx++;
482 }
483 }
484
485 return base_idx;
486}
487
488static U32 zSceneInitFunc_SBNPC(zScene* s, zSceneObjectInstanceDesc* desc, U32 base_idx)
489{

Callers

nothing calls this directly

Calls 6

zMovePoint_GetMemPoolFunction · 0.85
zMovePoint_GetInstFunction · 0.85
zSceneSetFunction · 0.85
zMovePointInitFunction · 0.85
zSceneObjHashtableAddFunction · 0.70
xSTFindAssetByTypeFunction · 0.50

Tested by

no test coverage detected