Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void EnTest_Update(Actor* thisx, GlobalContext* globalCtx) {
- EnTest* this = THIS;
- f32 oldWeight;
- u32 floorProperty;
- s32 pad;
- func_808634F8(this, globalCtx);
- if (this->actor.colChkInfo.damageEffect != 6) {
- Actor_MoveForward(&this->actor);
- Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 75.0f, 30.0f, 30.0f, 0x1D);
- if (this->actor.params != 1) {
- goto label_1;
- }
- if (this->actor.world.pos.y <= this->actor.home.pos.y) {
- this->actor.world.pos.y = this->actor.home.pos.y;
- this->actor.velocity.y = 0.0f;
- }
- if (this->actor.floorHeight <= this->actor.home.pos.y) {
- this->actor.floorHeight = this->actor.home.pos.y;
- }
- label_2:
- this->actionFunc(this, globalCtx);
- switch (this->unk_7DE) {
- {
- label_1:
- if (!(this->actor.bgCheckFlags & 2)) {
- goto label_2;
- }
- floorProperty = func_80041EA4(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId);
- if ((floorProperty != 5) && (floorProperty != 0xC)) {
- if (func_80041D4C(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId) != 9) {
- goto label_2;
- }
- }
- Actor_Kill(&this->actor);
- return;
- }
- case 0:
- break;
- case 1:
- Animation_Change(&this->skelAnime_4A8, &D_06001C20, 2.0f, 0.0f, Animation_GetLastFrame(&D_06001C20), 2,
- 2.0f);
- AnimationContext_SetCopyTrue(globalCtx, this->skelAnime_188.limbCount, this->skelAnime_188.jointTable,
- this->skelAnime_4A8.jointTable, D_80864510);
- this->unk_7DE++;
- break;
- case 2:
- SkelAnime_Update(&this->skelAnime_4A8);
- SkelAnime_CopyFrameTableTrue(&this->skelAnime_188, this->skelAnime_188.jointTable,
- this->skelAnime_4A8.jointTable, D_80864510);
- break;
- case 3:
- this->unk_7DE++;
- this->skelAnime_4A8.morphWeight = 4.0f;
- // fallthrough
- case 4:
- oldWeight = this->skelAnime_4A8.morphWeight;
- this->skelAnime_4A8.morphWeight = this->skelAnime_4A8.morphWeight - 1.0f;
- if (this->skelAnime_4A8.morphWeight <= 0.0f) {
- this->unk_7DE = 0;
- }
- SkelAnime_InterpFrameTable(this->skelAnime_188.limbCount, this->skelAnime_4A8.jointTable,
- this->skelAnime_4A8.jointTable, this->skelAnime_188.jointTable,
- 1.0f - (this->skelAnime_4A8.morphWeight / oldWeight));
- SkelAnime_CopyFrameTableTrue(&this->skelAnime_188, this->skelAnime_188.jointTable,
- this->skelAnime_4A8.jointTable, D_80864510);
- break;
- }
- if ((this->actor.colorFilterTimer == 0) && (this->actor.colChkInfo.health != 0)) {
- if ((this->unk_7C8 != 0x10) && (this->unk_7C8 != 0x17)) {
- func_80863460(this, globalCtx);
- } else {
- Math_SmoothStepToS(&this->unk_7D2, 0, 1, 0x3E8, 0);
- }
- }
- }
- Collider_UpdateCylinder(this, &this->collider);
- this->actor.focus.pos = this->actor.world.pos;
- this->actor.focus.pos.y += 45.0f;
- if ((this->actor.colChkInfo.health > 0) || (this->actor.colorFilterTimer != 0)) {
- CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
- if ((this->unk_7C8 >= 0xA) &&
- ((this->actor.colorFilterTimer == 0) || (!(this->actor.colorFilterParams & 0x4000)))) {
- CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
- }
- if (this->unk_7DE != 0) {
- CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->shieldCollider);
- }
- }
- if (this->atOn > 0) {
- if (!(this->swordCollider.base.atFlags & 4)) {
- CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->swordCollider);
- } else {
- this->swordCollider.base.atFlags &= ~4;
- func_80863240(this);
- }
- }
- if (this->actor.params == 0) {
- if (globalCtx->actorCtx.unk_03 != 0) {
- this->actor.flags |= 0x81;
- this->actor.shape.shadowDraw = ActorShadow_DrawFeet;
- } else {
- this->actor.flags &= ~0x81;
- this->actor.shape.shadowDraw = NULL;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement