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

Method Init

src/SB/Game/zNPCGlyph.cpp:346–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346void NPCGlyph::Init(en_npcglyph gtyp, RpAtomic* model_data)
347{
348 xVec3 vec = {};
349
350 typ_glyph = gtyp;
351
352 if (model_data != NULL)
353 {
354 mdl_glyph = xModelInstanceAlloc(model_data, NULL, 0, 0, NULL);
355 if (mdl_glyph != NULL)
356 {
357 xMat4x3 frame;
358 xMat3x3Euler(&frame, &vec);
359 xVec3Copy(&frame.pos, &g_O3);
360 frame.flags = 0;
361 xModelSetFrame(mdl_glyph, &frame);
362 }
363 }
364
365 Reset();
366}
367
368void NPCGlyph::Kill()
369{

Callers 3

zNPCGlyph_ScenePrepareFunction · 0.45
zVolumeInitFunction · 0.45
CreateNPCMethod · 0.45

Calls 5

xMat3x3EulerFunction · 0.85
xVec3CopyFunction · 0.85
xModelSetFrameFunction · 0.85
xModelInstanceAllocFunction · 0.50
ResetFunction · 0.50

Tested by

no test coverage detected