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

Function zEntSimpleObj_Update

src/SB/Game/zEntSimpleObj.cpp:571–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571void zEntSimpleObj_Update(zEntSimpleObj* ent, xScene* scene, float dt)
572{
573 void* temp_r3;
574 f32 temp_f0;
575 f32 temp_f1;
576 xModelInstance* temp_r3_2;
577 xModelInstance* temp_r4;
578 xQuat* temp_r31;
579 xVec3* temp_r30;
580
581 xEntUpdate((xEnt*)ent, scene, dt);
582 temp_r3 = ent->anim;
583 if (temp_r3 != NULL)
584 {
585 temp_r4 = ent->model;
586 if ((temp_r4 != NULL) && !(temp_r4->Flags & 0x400))
587 {
588 temp_f1 = iAnimDuration(temp_r3);
589 ent->animTime += dt;
590 temp_f0 = ent->animTime;
591 if (temp_f0 >= temp_f1)
592 {
593 ent->animTime = temp_f0 - temp_f1;
594 }
595 temp_r31 = (xQuat*)giAnimScratch;
596 temp_r30 = (xVec3*)((char*)temp_r31 + 0x410);
597 iAnimEval(ent->anim, ent->animTime, 0U, temp_r30, temp_r31);
598 temp_r3_2 = ent->model;
599 iModelAnimMatrices(temp_r3_2->Data, temp_r31, temp_r30, temp_r3_2->Mat + 0x1);
600 }
601 }
602}
603
604void zEntSimpleObj_Reset(zEntSimpleObj* ent, xScene* scene)
605{

Callers

nothing calls this directly

Calls 4

xEntUpdateFunction · 0.85
iAnimDurationFunction · 0.85
iAnimEvalFunction · 0.85
iModelAnimMatricesFunction · 0.50

Tested by

no test coverage detected