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

Function zSceneInitFunc_Camera

src/SB/Game/zScene.cpp:557–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557static U32 zSceneInitFunc_Camera(zScene* s, zSceneObjectInstanceDesc* desc, U32 base_idx)
558{
559 S32 count;
560 zCamMarker* camBlock;
561
562 count = s->baseCount[desc->baseType];
563
564 if (count)
565 {
566 camBlock = (zCamMarker*)xMemAllocSize(count * sizeof(zCamMarker));
567 s->baseList[desc->baseType] = camBlock;
568
569 for (S32 idx = 0; idx < count; idx++)
570 {
571 xBase* b = &camBlock[idx];
572 xCamAsset* assetCam = (xCamAsset*)xSTFindAssetByType('CAM ', idx, NULL);
573
574 zSceneSet(b, base_idx);
575 zCamMarkerInit(b, assetCam);
576 zSceneObjHashtableAdd(b->id, b);
577
578 base_idx++;
579 }
580 }
581
582 return base_idx;
583}
584
585static U32 zSceneInitFunc_Surface(zScene* s, zSceneObjectInstanceDesc* desc, U32 base_idx)
586{

Callers

nothing calls this directly

Calls 4

zSceneSetFunction · 0.85
zCamMarkerInitFunction · 0.85
zSceneObjHashtableAddFunction · 0.70
xSTFindAssetByTypeFunction · 0.50

Tested by

no test coverage detected