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

Method Init

src/SB/Game/zNPCTypeBossPatrick.cpp:396–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394S32 BoundEventCB(xBase*, xBase*, U32, const F32*, xBase*);
395
396void zNPCBPatrick::Init(xEntAsset* asset)
397{
398 /*
399 signed int i; // r20
400 class xEnt * ent; // r19
401 class RwTexture * tempTexture; // r2
402 */
403
404 zNPCCommon::Init(asset);
405
406 sPat_Ptr = this;
407
408 this->round = 1;
409 this->firstTimeR1Csn = 1;
410 Pat_ResetGlobalStuff();
411 this->boundList = (xEnt**)xMemAlloc(gActiveHeap, 0x10, 0);
412
413 for (S32 i = 0; i < 4; i++)
414 {
415 this->boundList[i] = (xEnt*)xMemAlloc(gActiveHeap, 0xd0, 0);
416 xEnt* ent = this->boundList[i];
417
418 ent->id = i;
419 ent->eventFunc = BoundEventCB;
420 ent->driver = this;
421 ent->baseType = eBaseTypeDynamic; // 0xc
422
423 ent->collType = XENT_COLLTYPE_STAT; // 2
424 ent->chkby = XENT_COLLTYPE_PLYR; // 0x10
425 ent->penby = XENT_COLLTYPE_PLYR; // 0x10
426
427 ent->baseFlags |= 0x21;
428 ent->moreFlags = 0x10;
429 ent->flags = this->flags;
430
431 ent->model = this->model;
432
433 ent->update = NULL;
434 ent->bupdate = NULL;
435 ent->render = NULL;
436 ent->transl = NULL;
437
438 ent->subType = 0;
439 ent->collModel = NULL;
440 ent->lightKit = NULL;
441
442 ent->pflags = 0;
443 ent->move = NULL;
444 ent->frame = NULL;
445 ent->collis = NULL;
446 ent->ffx = NULL;
447 ent->num_ffx = 0;
448 ent->anim_coll = NULL;
449
450 xGridBoundInit(&ent->gridb, &ent->id);
451 ent->collLev = 1;
452 ent->bound.cyl.r = sBoundRadius[0];
453 GetBonePos(&this->boundList[i]->bound.mat->pos, (xMat4x3*)this->model->Mat,

Callers

nothing calls this directly

Calls 8

Pat_ResetGlobalStuffFunction · 0.85
xGridBoundInitFunction · 0.85
GetBonePosFunction · 0.70
InitFunction · 0.50
xMemAllocFunction · 0.50
xQuickCullForBoundFunction · 0.50
xSTFindAssetFunction · 0.50
xStrHashFunction · 0.50

Tested by

no test coverage detected