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

Method Setup

src/SB/Game/zNPCTypeBossPatrick.cpp:489–648  ·  view source on GitHub ↗

73% match. Kind of a difficult function

Source from the content-addressed store, hash-verified

487
488// 73% match. Kind of a difficult function
489void zNPCBPatrick::Setup()
490{
491 char tempString[32]; // r29+0xA0
492 char objName[32]; // r29+0x80
493 /*
494 char tempString[32]; // r29+0xA0
495 signed int i; // r18
496 signed int j; // r20
497 class RpAtomic * tempIModel; // r2
498 class xMarkerAsset * marker; // r2
499 char objName[32]; // r29+0x80
500 */
501
502 this->freezeBreathEmitter = zParEmitterFind("FREEZE_BREATH_EMIT");
503 this->fudgeEmitter = zParEmitterFind("FUDGE_EMIT");
504 this->steamEmitter = zParEmitterFind("STEAM PAR EMIT");
505 this->gooObj = (xEnt*)zSceneFindObject(xStrHash("GOO OBJ"));
506 this->fudgeHandle = (xEnt*)zSceneFindObject(xStrHash("FUDGE_HANDLE"));
507
508 //
509
510 strcpy(objName, "SWINGHOOK 00");
511 this->origSwingerHeight = f832;
512
513 for (S32 i = 0; i < 8; i++)
514 {
515 objName[11]++;
516 this->swinger[i] = (xEnt*)zSceneFindObject(xStrHash(objName));
517 this->origSwingerHeight =
518 this->swinger[i]->model->Mat->pos.y * f1045 + this->origSwingerHeight;
519 }
520
521 for (S32 i = 0; i < 8; i++)
522 {
523 this->swinger[i]->model->Mat->pos.y +=
524 (this->origSwingerHeight - this->swinger[i]->model->Mat->pos.y);
525 }
526
527 //
528
529 strcpy(objName, "WOODEN_PLAT_00_00");
530
531 for (S32 i = 0; i < 8; i++)
532 {
533 objName[16]++;
534
535 for (S32 j = 0; j < 3; j++)
536 {
537 objName[13]++;
538 this->box[j][i].box = (xEnt*)zSceneFindObject(xStrHash(objName));
539 this->box[j][i].minY = this->box[j][i].box->model->Mat->pos.y;
540 // must be being cast to some other data type to dereference 0xd8
541 // probably zEntSimpleObj?
542 ((zEntSimpleObj*)this->box[j][i].box)->sflags |= 8;
543 }
544 }
545
546 this->backBox.box = (xEnt*)zSceneFindObject(xStrHash("WOODEN_PLAT_BACK"));

Callers

nothing calls this directly

Calls 14

zSceneFindObjectFunction · 0.85
xVec3CopyFunction · 0.85
xVec3InitFunction · 0.85
xVec3AddToFunction · 0.85
TalkOnScreenMethod · 0.80
zParEmitterFindFunction · 0.70
xDebugAddTweakFunction · 0.70
xStrHashFunction · 0.50
xSTFindAssetFunction · 0.50
xModelInstanceAllocFunction · 0.50
SetupFunction · 0.50
DuploOwnerMethod · 0.45

Tested by

no test coverage detected