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

Method Init

src/SB/Game/zNPCSupplement.cpp:467–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465void* xMemAlloc(U32 heapID, U32 size, S32 align, void* data, S32 dataSize);
466
467void NPARMgmt::Init(en_nparptyp parType, void** userData, NPARXtraData* xtraData)
468{
469 S32 amt = g_npar_info[parType].num_maxParticles;
470 NPARInfo* info = &g_npar_info[parType];
471
472 void* mem = xMemAlloc(gActiveHeap, amt * 0x50, 0x10, xtraData, parType << 4);
473 memset(mem, 0, amt * 0x50);
474 typ_npar = parType;
475 flg_npar = info->flg_npar;
476 par_buf = (NPARData*)mem;
477 cnt_active = 0;
478 num_max = info->num_maxParticles;
479 UserDataSet(userData);
480 XtraDataSet(xtraData);
481 if (info->nam_texture == NULL)
482 {
483 txtr = NULL;
484 }
485 else
486 {
487 txtr = NPCC_FindRWTexture( info->nam_texture );
488 }
489}
490#endif
491
492void NPARMgmt::Clear()

Callers 1

NPAR_PartySetupFunction · 0.45

Calls 3

memsetFunction · 0.85
NPCC_FindRWTextureFunction · 0.85
xMemAllocFunction · 0.50

Tested by

no test coverage detected