1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Some actor.c docs (in preparation for en_test) (#820)

* renames

* format

* format functions.h

* clean

* arg name

* remove asm
This commit is contained in:
fig02 2021-06-21 19:51:04 -04:00 committed by GitHub
parent 7984c1c514
commit 0a35c752e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 424 additions and 359 deletions

View file

@ -129,11 +129,12 @@ void BgHidanFirewall_Erupt(BgHidanFirewall* this, GlobalContext* globalCtx) {
void BgHidanFirewall_Collide(BgHidanFirewall* this, GlobalContext* globalCtx) {
s16 phi_a3;
if (func_8002E084(&this->actor, 0x4000) != 0) {
if (Actor_IsFacingPlayer(&this->actor, 0x4000)) {
phi_a3 = this->actor.shape.rot.y;
} else {
phi_a3 = this->actor.shape.rot.y + 0x8000;
}
func_8002F71C(globalCtx, &this->actor, 5.0f, phi_a3, 1.0f);
}

View file

@ -522,7 +522,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, GlobalContext* globalCtx) {
if (((this->timer == 0) || ((thisx->xzDistToPlayer < 150.0f) && (thisx->yDistToPlayer < 50.0f)) ||
(func_8002DD78(player) && (thisx->xzDistToPlayer < 320.0f) &&
((this->index != 2) ? (thisx->yDistToPlayer < 100.0f) : (thisx->yDistToPlayer < 0.0f)) &&
func_8002DFC8(thisx, 0x2000, globalCtx))) &&
Player_IsFacingActor(thisx, 0x2000, globalCtx))) &&
((thisx->parent != NULL) || (thisx->child != NULL))) {
/*The third condition in the || is checking if
1) Link is holding a ranged weapon

View file

@ -234,7 +234,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) {
gSaveContext.nextCutsceneIndex = 0xFFF1;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 4;
} else if (func_8002E12C(&this->dyna.actor, 3000.0f, 30000)) {
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 3000.0f, 0x7530)) {
globalCtx->envCtx.gloomySkyEvent = 1;
}
}

View file

@ -97,7 +97,7 @@ void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
if (((gSaveContext.eventChkInf[4] & 0x8000) == 0) && (gSaveContext.sceneSetupIndex < 4) &&
(func_8002E12C(&this->actor, 800.0f, 0x7530) != 0) && !Gameplay_InCsMode(globalCtx)) {
Actor_IsFacingAndNearPlayer(&this->actor, 800.0f, 0x7530) && !Gameplay_InCsMode(globalCtx)) {
gSaveContext.eventChkInf[4] |= 0x8000;
globalCtx->csCtx.segment = D_808BBD90;
gSaveContext.cutsceneTrigger = 1;
@ -116,7 +116,7 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
this->actor.parent = NULL;
BgTokiSwd_SetupAction(this, func_808BB0AC);
} else {
if (func_8002E084(&this->actor, 0x2000) != 0) {
if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_8002F580(&this->actor, globalCtx);
}
}

View file

@ -142,7 +142,7 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
if ((!(Flags_GetEventChkInf(5))) || LINK_IS_ADULT) {
if (LINK_IS_CHILD) {
if (Flags_GetEventChkInf(0xC)) {
if (func_8002E12C(&this->dyna.actor, 1658.0f, 0x7530)) {
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
this->dyna.actor.flags |= 1;
if (this->dyna.actor.isTargeted) {
this->dyna.actor.flags &= ~1;
@ -151,7 +151,7 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
BgTreemouth_SetupAction(this, func_808BC9EC);
}
}
} else if (func_8002E12C(&this->dyna.actor, 1658.0f, 0x4E20)) {
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x4E20)) {
Flags_SetEventChkInf(0xC);
globalCtx->csCtx.segment = D_808BCE20;
gSaveContext.cutsceneTrigger = 1;
@ -167,7 +167,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (globalCtx->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) {
if (func_8002E12C(&this->dyna.actor, 350.0f, 0x7530)) {
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 350.0f, 0x7530)) {
player->actor.world.pos.x = 3827.0f;
player->actor.world.pos.y = -161.0f;
player->actor.world.pos.z = -1142.0f;

View file

@ -692,9 +692,9 @@ void BossDodongo_Walk(BossDodongo* this, GlobalContext* globalCtx) {
} else if (this->unk_1BC != 2) {
if (((s32)this->skelAnime.curFrame == 1) || ((s32)this->skelAnime.curFrame == 31)) {
if ((s32)this->skelAnime.curFrame == 1) {
func_80033260(globalCtx, &this->actor, &this->unk_410, 25.0f, 0xA, 8.0f, 0x1F4, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->unk_410, 25.0f, 0xA, 8.0f, 0x1F4, 0xA, 0);
} else {
func_80033260(globalCtx, &this->actor, &this->unk_404, 25.0f, 0xA, 8.0f, 0x1F4, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->unk_404, 25.0f, 0xA, 8.0f, 0x1F4, 0xA, 0);
}
if (this->unk_1BC != 0) {
@ -789,7 +789,7 @@ void BossDodongo_Roll(BossDodongo* this, GlobalContext* globalCtx) {
}
if (!(this->unk_19E & 1)) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 40.0f, 3, 8.0f, 0x1F4, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 40.0f, 3, 8.0f, 0x1F4, 0xA, 0);
}
}
}
@ -1257,7 +1257,7 @@ void BossDodongo_UpdateDamage(BossDodongo* this, GlobalContext* globalCtx) {
if ((this->health <= 0) && (this->actionFunc != BossDodongo_DeathCutscene)) {
BossDodongo_SetupDeathCutscene(this);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
return;
}
@ -1421,7 +1421,8 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
Camera_AddQuake(&globalCtx->mainCamera, 2, 1, 8);
}
if (!(this->unk_19E & 1)) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 40.0f, 3, 8.0f, 0x1F4, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 40.0f, 3, 8.0f, 0x1F4, 0xA,
0);
}
tempSin = cornerPos->x - this->actor.world.pos.x;
tempCos = cornerPos->z - this->actor.world.pos.z;
@ -1545,7 +1546,8 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
if (!(this->unk_19E & 1)) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 40.0f, 3, 8.0f, 0x1F4, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 40.0f, 3, 8.0f, 0x1F4, 0xA,
0);
}
}
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.2f, 0.1f, 0.0f);

View file

@ -886,7 +886,7 @@ void BossFd2_CollisionCheck(BossFd2* this, GlobalContext* globalCtx) {
this->work[FD2_INVINC_TIMER] = 30000;
Audio_SetBGM(0x100100FF);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_VALVAISA_DEAD);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else if (damage) {
BossFd2_SetupDamaged(this, globalCtx);
this->work[FD2_DAMAGE_FLASH_TIMER] = 10;

View file

@ -1258,7 +1258,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, GlobalContext* globalCtx)
if ((s8)this->actor.colChkInfo.health <= 0) {
BossGanondrof_SetupDeath(this, globalCtx);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
return;
}
}

View file

@ -368,11 +368,13 @@ void BossGoma_Init(Actor* thisx, GlobalContext* globalCtx) {
void BossGoma_PlayEffectsAndSfx(BossGoma* this, GlobalContext* globalCtx, s16 arg2, s16 amountMinus1) {
if (arg2 == 0 || arg2 == 1 || arg2 == 3) {
func_80033260(globalCtx, &this->actor, &this->rightHandBackLimbWorldPos, 25.0f, amountMinus1, 8.0f, 500, 10, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->rightHandBackLimbWorldPos, 25.0f, amountMinus1, 8.0f, 500,
10, 1);
}
if (arg2 == 0 || arg2 == 2 || arg2 == 3) {
func_80033260(globalCtx, &this->actor, &this->leftHandBackLimbWorldPos, 25.0f, amountMinus1, 8.0f, 500, 10, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->leftHandBackLimbWorldPos, 25.0f, amountMinus1, 8.0f, 500,
10, 1);
}
if (arg2 == 0) {
@ -1372,7 +1374,7 @@ void BossGoma_FloorLandStruckDown(BossGoma* this, GlobalContext* globalCtx) {
this->framesUntilNextAction = 150;
}
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 55.0f, 4, 8.0f, 500, 10, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 55.0f, 4, 8.0f, 500, 10, 1);
}
/**
@ -1398,7 +1400,7 @@ void BossGoma_FloorStunned(BossGoma* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelanime);
if (this->timer == 1) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 55.0f, 4, 8.0f, 500, 10, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 55.0f, 4, 8.0f, 500, 10, 1);
}
Math_ApproachZeroF(&this->actor.speedXZ, 0.5f, 1.0f);
@ -1819,7 +1821,7 @@ void BossGoma_UpdateHit(BossGoma* this, GlobalContext* globalCtx) {
EffectSsSibuki_SpawnBurst(globalCtx, &this->actor.focus.pos);
} else {
BossGoma_SetupDefeated(this, globalCtx);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
}
this->invincibilityFrames = 10;

View file

@ -2544,7 +2544,7 @@ void BossSst_HeadCollisionCheck(BossSst* this, GlobalContext* globalCtx) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actionFunc == BossSst_HeadVulnerable) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
BossSst_HeadSetupDeath(this, globalCtx);
} else {
BossSst_HeadSetupDamage(this);

View file

@ -443,7 +443,7 @@ void DemoKankyo_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (globalCtx->sceneNum == SCENE_TOKINOMA) {
if (!Flags_GetEnv(globalCtx, 1)) {
break;
} else if (!func_8002E12C(&this->actor, 300.0f, 0x7530)) {
} else if (!Actor_IsFacingAndNearPlayer(&this->actor, 300.0f, 0x7530)) {
break;
} else {
if (LINK_IS_CHILD) {

View file

@ -560,7 +560,8 @@ void func_809973E8(DoorShutter* this, GlobalContext* globalCtx) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) {
if (this->dyna.actor.velocity.y > 20.0f) {
this->dyna.actor.floorHeight = this->dyna.actor.home.pos.y;
func_80033260(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 45.0f, 0xA, 8.0f, 0x1F4, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 45.0f, 0xA, 8.0f, 0x1F4,
0xA, 0);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
quakeId = Quake_Add(Gameplay_GetCamera(globalCtx, 0), 3);
@ -596,7 +597,8 @@ void func_809975C0(DoorShutter* this, GlobalContext* globalCtx) {
this->unk_164 = 10;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
func_8099803C(globalCtx, 2, 10, parent->subCameraId);
func_80033260(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 70.0f, 20, 8.0f, 500, 10, 1);
Actor_SpawnFloorDust(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 70.0f, 20, 8.0f, 500, 10,
1);
}
}
}

View file

@ -270,7 +270,7 @@ void EnAm_SpawnEffects(EnAm* this, GlobalContext* globalCtx) {
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EN_AMOS_WALK);
func_80033260(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 4.0f, 3, 8.0f, 0x12C, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 4.0f, 3, 8.0f, 0x12C, 0xF, 0);
}
void EnAm_SetupSleep(EnAm* this) {
@ -348,7 +348,7 @@ void EnAm_SetupRecoilFromDamage(EnAm* this, GlobalContext* globalCtx) {
}
this->dyna.actor.colorFilterTimer = 0;
func_80032C7C(globalCtx, &this->dyna.actor);
Enemy_StartFinishingBlow(globalCtx, &this->dyna.actor);
EnAm_SetupAction(this, EnAm_RecoilFromDamage);
}
@ -800,7 +800,7 @@ void EnAm_UpdateDamage(EnAm* this, GlobalContext* globalCtx) {
if (this->dyna.actor.colChkInfo.damageEffect != AM_DMGEFF_MAGIC_FIRE_LIGHT) {
this->unk_264 = 0;
this->damageEffect = this->dyna.actor.colChkInfo.damageEffect;
func_80035650(&this->dyna.actor, &this->hurtCollider.info, 0);
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.info, 0);
if ((this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_NUT) ||
(this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_STUN) ||

View file

@ -367,7 +367,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) {
flameCircle->timer != 0) {
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP);
this->actor.flags &= ~1;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANUBIS_DEAD);
this->actionFunc = EnAnubice_SetupDie;
return;
@ -379,7 +379,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.colChkInfo.damageEffect == 2) {
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP);
this->actor.flags &= ~1;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANUBIS_DEAD);
this->actionFunc = EnAnubice_SetupDie;
return;

View file

@ -715,7 +715,7 @@ void EnBb_Down(EnBb* this, GlobalContext* globalCtx) {
this->actor.velocity.y = 10.0f;
}
this->actor.bgCheckFlags &= ~1;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
Math_SmoothStepToS(&this->actor.world.rot.y, -this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
}
this->actor.shape.rot.y = this->actor.world.rot.y;
@ -1115,7 +1115,7 @@ void EnBb_Stunned(EnBb* this, GlobalContext* globalCtx) {
} else {
this->actor.velocity.y = 0.0f;
}
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
}
if (this->actor.colorFilterTimer == 0) {
this->actor.shape.yOffset = 200.0f;
@ -1153,7 +1153,7 @@ void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->dmgEffect = this->actor.colChkInfo.damageEffect;
func_80035650(&this->actor, &this->collider.elements[0].info, 0);
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, 0);
switch (this->dmgEffect) {
case 7:
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;

View file

@ -551,12 +551,12 @@ void EnBili_UpdateDamage(EnBili* this, GlobalContext* globalCtx) {
if ((this->actor.colChkInfo.health != 0) && (this->collider.base.acFlags & AC_HIT)) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BIRI_DEAD);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
}

View file

@ -424,7 +424,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
player = PLAYER;
func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos);
if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f &&
func_8002DFC8(&this->dyna.actor, 0x3000, globalCtx)) {
Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) {
func_8002F554(&this->dyna.actor, globalCtx, 0 - (this->dyna.actor.params >> 5 & 0x7F));
}
if (Flags_GetTreasure(globalCtx, this->dyna.actor.params & 0x1F)) {

View file

@ -337,7 +337,7 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
case 3:
Math_SmoothStepToF(&this->unk_248, 0.6f, 1.0f, 0.05f, 0.0f);
if ((this->unk_224 == 0) && (this->actor.xzDistToPlayer < 200.0f) &&
(ABS(this->actor.yDistToPlayer) < 50.0f) && func_8002E084(&this->actor, 0x1C70)) {
(ABS(this->actor.yDistToPlayer) < 50.0f) && Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
func_809CF72C(this);
} else {
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_236 + this->unk_238, 1,
@ -350,7 +350,7 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1,
this->actor.speedXZ * 1000.0f, 0);
if ((this->actor.xzDistToPlayer < 90.0f) && (this->actor.yDistToPlayer < 50.0f) &&
func_8002E084(&this->actor, 0x1554) &&
Actor_IsFacingPlayer(&this->actor, 0x1554) &&
func_800339B8(&this->actor, globalCtx, 71.24802f, this->actor.yawTowardsPlayer)) {
func_809CF8F0(this);
}
@ -365,8 +365,8 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
}
break;
case 1:
if (((sp64 == 0) && !(this->actor.bgCheckFlags & 8)) || func_8002E084(&this->actor, 0x1C70)) {
if (func_8002E084(&this->actor, 0x1C70)) {
if (((sp64 == 0) && !(this->actor.bgCheckFlags & 8)) || Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
if (Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
this->unk_238 = -this->unk_238;
}
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer - 0x8000, 1,
@ -460,7 +460,7 @@ void func_809CF984(EnBw* this, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
return;
}
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
this->unk_222 = 3000;
this->actor.flags &= ~0x01000000;
this->actor.speedXZ = 0.0f;
@ -494,7 +494,7 @@ void func_809CFC4C(EnBw* this, GlobalContext* globalCtx) {
this->unk_258 += this->unk_25C;
Math_SmoothStepToF(&this->unk_260, 0.075f, 1.0f, 0.005f, 0.0f);
if (this->actor.bgCheckFlags & 2) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
}
if (this->unk_224 != 0) {
@ -544,7 +544,7 @@ void func_809CFF98(EnBw* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->unk_248, 0.6f, 1.0f, 0.05f, 0.0f);
SkelAnime_Update(&this->skelAnime);
if (this->actor.bgCheckFlags & 3) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
this->unk_222 = 0xBB8;
this->unk_250 = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
@ -667,7 +667,7 @@ void func_809D0424(EnBw* this, GlobalContext* globalCtx) {
if (func_800355E4(globalCtx, &this->collider2.base)) {
this->unk_230 = 0;
this->actor.scale.y -= 0.009f;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
} else {
this->unk_230 = 1;
}
@ -681,7 +681,7 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 0x10) && (this->actor.bgCheckFlags & 1)) {
this->unk_230 = 0;
this->actor.scale.y -= 0.009f;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
func_809D00F4(this);
} else {
if (this->collider2.base.acFlags & AC_HIT) {
@ -690,7 +690,7 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) {
return;
}
this->damageEffect = this->actor.colChkInfo.damageEffect;
func_80035650(&this->actor, &this->collider2.info, 0);
Actor_SetDropFlag(&this->actor, &this->collider2.info, 0);
if ((this->damageEffect == 1) || (this->damageEffect == 0xE)) {
if (this->unk_23C == 0) {
Actor_ApplyDamage(&this->actor);
@ -709,7 +709,8 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) {
if (func_800355E4(globalCtx, &this->collider2.base)) {
this->unk_230 = 0;
this->actor.scale.y -= 0.009f;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0,
0);
} else {
this->unk_230 = 1;
}

View file

@ -286,7 +286,7 @@ void EnCrow_FlyIdle(EnCrow* this, GlobalContext* globalCtx) {
void EnCrow_DiveAttack(EnCrow* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 yaw;
s32 facingPlayer;
Vec3f pos;
s16 target;
@ -295,9 +295,9 @@ void EnCrow_DiveAttack(EnCrow* this, GlobalContext* globalCtx) {
this->timer--;
}
yaw = func_8002E084(&this->actor, 0x2800);
facingPlayer = Actor_IsFacingPlayer(&this->actor, 0x2800);
if (yaw != 0) {
if (facingPlayer) {
pos.x = player->actor.world.pos.x;
pos.y = player->actor.world.pos.y + 20.0f;
pos.z = player->actor.world.pos.z;
@ -310,7 +310,7 @@ void EnCrow_DiveAttack(EnCrow* this, GlobalContext* globalCtx) {
Math_ApproachS(&this->actor.shape.rot.x, -0x1000, 2, 0x100);
}
if ((yaw != 0) || (this->actor.xzDistToPlayer > 80.0f)) {
if (facingPlayer || (this->actor.xzDistToPlayer > 80.0f)) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00);
}
@ -413,14 +413,14 @@ void EnCrow_Respawn(EnCrow* this, GlobalContext* globalCtx) {
void EnCrow_UpdateDamage(EnCrow* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.elements[0].info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect == 1) { // Deku Nuts
EnCrow_SetupTurnAway(this);
} else {
Actor_ApplyDamage(&this->actor);
this->actor.flags &= ~1;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
EnCrow_SetupDamaged(this, globalCtx);
}
}

View file

@ -446,7 +446,7 @@ void EnDekunuts_Die(EnDekunuts* this, GlobalContext* globalCtx) {
void EnDekunuts_ColliderCheck(EnDekunuts* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if (this->actor.colChkInfo.mass == 0x32) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect != 1) {
@ -455,7 +455,7 @@ void EnDekunuts_ColliderCheck(EnDekunuts* this, GlobalContext* globalCtx) {
}
EnDekunuts_SetupBeDamaged(this);
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
}
} else if (this->actionFunc != EnDekunuts_BeStunned) {
EnDekunuts_SetupBeStunned(this);

View file

@ -270,7 +270,7 @@ void EnDh_Walk(EnDh* this, GlobalContext* globalCtx) {
}
if (this->actor.xzDistToPlayer <= 100.0f) {
this->actor.speedXZ = 0.0f;
if (func_8002E084(&this->actor, 60 * 0x10000 / 360)) {
if (Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360)) {
EnDh_SetupAttack(this);
}
} else if (--this->timer == 0) {
@ -311,7 +311,7 @@ void EnDh_Attack(EnDh* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
this->actionState++;
} else if ((this->actor.xzDistToPlayer > 100.0f) || !func_8002E084(&this->actor, 60 * 0x10000 / 360)) {
} else if ((this->actor.xzDistToPlayer > 100.0f) || !Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360)) {
Animation_Change(&this->skelAnime, &D_06004658, -1.0f, this->skelAnime.curFrame, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = 4;
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags = AT_NONE; // also TOUCH_NONE
@ -344,7 +344,7 @@ void EnDh_Attack(EnDh* this, GlobalContext* globalCtx) {
}
break;
case 3:
if ((this->actor.xzDistToPlayer <= 100.0f) && (func_8002E084(&this->actor, 60 * 0x10000 / 360) != 0)) {
if ((this->actor.xzDistToPlayer <= 100.0f) && (Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360))) {
Animation_Change(&this->skelAnime, &D_06004658, 1.0f, 20.0f, Animation_GetLastFrame(&D_06004658),
ANIMMODE_ONCE, -6.0f);
this->actionState = 0;
@ -427,7 +427,7 @@ void EnDh_Damage(EnDh* this, GlobalContext* globalCtx) {
this->actor.world.rot.y = this->actor.shape.rot.y;
if (this->retreat) {
EnDh_SetupRetreat(this, globalCtx);
} else if ((this->actor.xzDistToPlayer <= 105.0f) && func_8002E084(&this->actor, 60 * 0x10000 / 360)) {
} else if ((this->actor.xzDistToPlayer <= 105.0f) && Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360)) {
f32 frames = Animation_GetLastFrame(&D_06004658);
EnDh_SetupAttack(this);

View file

@ -356,7 +356,7 @@ s32 func_809F70E8(EnDodojr* this, GlobalContext* globalCtx) {
}
if ((this->actor.colChkInfo.damageEffect == 0) && (this->actor.colChkInfo.damage != 0)) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->timer2 = 2;
this->actionFunc = func_809F7C48;
return 1;

View file

@ -551,13 +551,13 @@ void EnDodongo_Walk(EnDodongo* this, GlobalContext* globalCtx) {
if ((s32)this->skelAnime.curFrame < 21) {
if (!this->rightFootStep) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_WALK);
func_80033260(globalCtx, &this->actor, &this->leftFootPos, 10.0f, 3, 2.0f, 0xC8, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->leftFootPos, 10.0f, 3, 2.0f, 0xC8, 0xF, 0);
this->rightFootStep = true;
}
} else {
if (this->rightFootStep) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_WALK);
func_80033260(globalCtx, &this->actor, &this->rightFootPos, 10.0f, 3, 2.0f, 0xC8, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->rightFootPos, 10.0f, 3, 2.0f, 0xC8, 0xF, 0);
this->rightFootStep = false;
}
}
@ -642,11 +642,11 @@ void EnDodongo_SweepTail(EnDodongo* this, GlobalContext* globalCtx) {
tailPos.x = this->sphElements[1].dim.worldSphere.center.x;
tailPos.y = this->sphElements[1].dim.worldSphere.center.y;
tailPos.z = this->sphElements[1].dim.worldSphere.center.z;
func_80033260(globalCtx, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, 0);
tailPos.x = this->sphElements[2].dim.worldSphere.center.x;
tailPos.y = this->sphElements[2].dim.worldSphere.center.y;
tailPos.z = this->sphElements[2].dim.worldSphere.center.z;
func_80033260(globalCtx, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, 0);
if (this->colliderBody.base.atFlags & AT_HIT) {
Player* player = PLAYER;
@ -717,7 +717,7 @@ void EnDodongo_CollisionCheck(EnDodongo* this, GlobalContext* globalCtx) {
this->colliderBody.base.acFlags &= ~AC_HIT;
} else if ((this->colliderBody.base.acFlags & AC_HIT) && (this->actionState > DODONGO_DEATH)) {
this->colliderBody.base.acFlags &= ~AC_HIT;
func_8003573C(&this->actor, &this->colliderBody, 0);
Actor_SetDropFlagJntSph(&this->actor, &this->colliderBody, 0);
if (this->actor.colChkInfo.damageEffect != 0xE) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 0xF)) {

View file

@ -610,11 +610,11 @@ void EnEiyer_Stunned(EnEiyer* this, GlobalContext* globalCtx) {
void EnEiyer_UpdateDamage(EnEiyer* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD);
this->actor.flags &= ~1;
}

View file

@ -293,7 +293,7 @@ s32 EnFd_ColliderCheck(EnFd* this, GlobalContext* globalCtx) {
this->invincibilityTimer = 30;
this->actor.flags &= ~1;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_DAMAGE);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
return true;
} else if (DECR(this->attackTimer) == 0 && this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
@ -666,7 +666,7 @@ void EnFd_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.flags &= ~1;
this->invincibilityTimer = 30;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_DAMAGE);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else {
this->actor.flags &= ~0x2000;
}

View file

@ -201,8 +201,8 @@ void EnFireRock_Fall(EnFireRock* this, GlobalContext* globalCtx) {
case FIRE_ROCK_SPAWNED_FALLING2:
func_80033E88(&this->actor, globalCtx, 5, 2);
case FIRE_ROCK_BROKEN_PIECE1:
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f,
500, 10, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1,
8.0f, 500, 10, 0);
for (i = 0; i < 5; i++) {
flamePos.x = Rand_CenteredFloat(20.0f) + this->actor.world.pos.x;
flamePos.y = this->actor.floorHeight;
@ -212,8 +212,8 @@ void EnFireRock_Fall(EnFireRock* this, GlobalContext* globalCtx) {
this->actionFunc = EnFireRock_SpawnMoreBrokenPieces;
break;
default:
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 3, 8.0f,
200, 10, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 3,
8.0f, 200, 10, 0);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
Actor_Kill(&this->actor);
break;

View file

@ -465,7 +465,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 8) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
} else if (func_8002E084(&this->actor, 0x2800)) {
} else if (Actor_IsFacingPlayer(&this->actor, 0x2800)) {
if (Animation_OnFrame(&this->skelAnime, 4.0f)) {
this->skelAnime.playSpeed = 0.0f;
this->skelAnime.curFrame = 4.0f;
@ -623,11 +623,11 @@ void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.elements[0].info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
}
@ -636,7 +636,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) {
if (damageEffect == 2) { // Din's Fire
if (this->actor.params == KEESE_ICE_FLY) {
this->actor.colChkInfo.health = 0;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
EnFirefly_Combust(this, globalCtx);
EnFirefly_SetupFall(this);
} else if (!this->onFire) {

View file

@ -255,7 +255,7 @@ void EnFloormas_SetupHover(EnFloormas* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 0.0f;
this->actor.gravity = 0.0f;
EnFloormas_MakeInvulnerable(this);
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 0x12C, 0x64, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 0x12C, 0x64, 1);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_ATTACK);
this->actionFunc = EnFloormas_Hover;
}
@ -444,11 +444,11 @@ void EnFloormas_Die(EnFloormas* this, GlobalContext* globalCtx) {
void EnFloormas_BigDecideAction(EnFloormas* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
// within 400 units of link and within 90 degrees rotation of him
if (this->actor.xzDistToPlayer < 400.0f && !func_8002E084(&this->actor, 0x4000)) {
if (this->actor.xzDistToPlayer < 400.0f && !Actor_IsFacingPlayer(&this->actor, 0x4000)) {
this->actionTarget = this->actor.yawTowardsPlayer;
EnFloormas_SetupTurn(this);
// within 280 units of link and within 45 degrees rotation of him
} else if (this->actor.xzDistToPlayer < 280.0f && func_8002E084(&this->actor, 0x2000)) {
} else if (this->actor.xzDistToPlayer < 280.0f && Actor_IsFacingPlayer(&this->actor, 0x2000)) {
EnFloormas_SetupHover(this, globalCtx);
} else {
EnFloormas_SetupStand(this);
@ -483,13 +483,13 @@ void EnFloormas_BigWalk(EnFloormas* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_WALK);
}
if ((this->actor.xzDistToPlayer < 320.0f) && (func_8002E084(&this->actor, 0x4000))) {
if ((this->actor.xzDistToPlayer < 320.0f) && (Actor_IsFacingPlayer(&this->actor, 0x4000))) {
EnFloormas_SetupRun(this);
} else if (this->actor.bgCheckFlags & 8) {
// set target rotation to the colliding wall's rotation
this->actionTarget = this->actor.wallYaw;
EnFloormas_SetupTurn(this);
} else if ((this->actor.xzDistToPlayer < 400.0f) && !func_8002E084(&this->actor, 0x4000)) {
} else if ((this->actor.xzDistToPlayer < 400.0f) && !Actor_IsFacingPlayer(&this->actor, 0x4000)) {
// set target rotation to link.
this->actionTarget = this->actor.yawTowardsPlayer;
EnFloormas_SetupTurn(this);
@ -514,7 +514,7 @@ void EnFloormas_Run(EnFloormas* this, GlobalContext* globalCtx) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x71C);
if ((this->actor.xzDistToPlayer < 280.0f) && func_8002E084(&this->actor, 0x2000) &&
if ((this->actor.xzDistToPlayer < 280.0f) && Actor_IsFacingPlayer(&this->actor, 0x2000) &&
!(this->actor.bgCheckFlags & 8)) {
EnFloormas_SetupHover(this, globalCtx);
} else if (this->actor.xzDistToPlayer > 400.0f) {
@ -980,7 +980,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, GlobalContext* globalCtx) {
if ((this->collider.base.acFlags & AC_HIT) != 0) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->collider.base.colType != COLTYPE_HARD) {
isSmall = 0;
@ -997,7 +997,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, GlobalContext* globalCtx) {
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DEAD);
}
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
} else if (this->actor.colChkInfo.damage != 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DAMAGE);

View file

@ -150,7 +150,7 @@ s32 EnFw_CheckCollider(EnFw* this, GlobalContext* globalCtx) {
this->collider.base.acFlags &= ~AC_HIT;
if (Actor_ApplyDamage(&this->actor) <= 0) {
if (this->actor.parent->colChkInfo.health <= 8) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.parent->colChkInfo.health = 0;
} else {
this->actor.parent->colChkInfo.health -= 8;

View file

@ -323,7 +323,7 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* this, s16 arg2) {
} else {
s16 angleToFacingLink = player->actor.shape.rot.y - thisx->shape.rot.y;
if ((thisx->xzDistToPlayer <= 45.0f) && !func_80033AB8(globalCtx, thisx) &&
if ((thisx->xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(globalCtx, thisx) &&
((globalCtx->gameplayFrames & 7) || (ABS(angleToFacingLink) < 0x38E0))) {
EnGeldB_SetupSlash(this);
return true;
@ -366,8 +366,8 @@ void EnGeldB_Wait(EnGeldB* this, GlobalContext* globalCtx) {
this->actor.focus.pos = this->actor.world.pos;
this->actor.bgCheckFlags &= ~2;
this->actor.velocity.y = 0.0f;
func_80033260(globalCtx, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
func_80033260(globalCtx, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
}
if (SkelAnime_Update(&this->skelAnime)) {
EnGeldB_SetupReady(this);
@ -391,8 +391,8 @@ void EnGeldB_Flee(EnGeldB* this, GlobalContext* globalCtx) {
}
if (this->skelAnime.curFrame == 2.0f) {
this->actor.gravity = 0.0f;
func_80033260(globalCtx, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
func_80033260(globalCtx, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
}
if (SkelAnime_Update(&this->skelAnime)) {
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.floorHeight + 300.0f, 1.0f, 20.5f, 0.0f);
@ -443,10 +443,10 @@ void EnGeldB_Ready(EnGeldB* this, GlobalContext* globalCtx) {
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
EnGeldB_SetupCircle(this);
} else if (--this->timer == 0) {
if (func_8002E084(&this->actor, 30 * 0x10000 / 360)) {
if (Actor_IsFacingPlayer(&this->actor, 30 * 0x10000 / 360)) {
if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) &&
(Rand_ZeroOne() < 0.3f)) {
if (func_80033AB8(globalCtx, &this->actor) || (Rand_ZeroOne() > 0.5f) ||
if (Actor_OtherIsTargeted(globalCtx, &this->actor) || (Rand_ZeroOne() > 0.5f) ||
(ABS(angleToLink) < 0x38E0)) {
EnGeldB_SetupRollForward(this);
} else {
@ -510,17 +510,17 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
playSpeed = ABS(this->skelAnime.playSpeed);
prevKeyFrame = (s32)(this->skelAnime.curFrame - playSpeed);
playSpeed = ABS(this->skelAnime.playSpeed); // yes it does this twice.
if (!func_8002E084(&this->actor, 0x11C7)) {
if (!Actor_IsFacingPlayer(&this->actor, 0x11C7)) {
if (Rand_ZeroOne() > 0.5f) {
EnGeldB_SetupCircle(this);
} else {
EnGeldB_SetupReady(this);
}
} else if (this->actor.xzDistToPlayer < 90.0f) {
if (!func_80033AB8(globalCtx, &this->actor) &&
if (!Actor_OtherIsTargeted(globalCtx, &this->actor) &&
(Rand_ZeroOne() > 0.03f || (this->actor.xzDistToPlayer <= 45.0f && facingAngletoLink < 0x38E0))) {
EnGeldB_SetupSlash(this);
} else if (func_80033AB8(globalCtx, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
} else if (Actor_OtherIsTargeted(globalCtx, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
EnGeldB_SetupRollBack(this);
} else {
EnGeldB_SetupCircle(this);
@ -528,8 +528,8 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
}
if (!EnGeldB_ReactToPlayer(globalCtx, this, 0)) {
if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) &&
func_8002E084(&this->actor, 0x71C)) {
if (func_80033A84(globalCtx, &this->actor)) {
Actor_IsFacingPlayer(&this->actor, 0x71C)) {
if (Actor_IsTargeted(globalCtx, &this->actor)) {
if (Rand_ZeroOne() > 0.5f) {
EnGeldB_SetupRollForward(this);
} else {
@ -572,13 +572,13 @@ void EnGeldB_RollForward(EnGeldB* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
this->invisible = false;
this->actor.speedXZ = 0.0f;
if (!func_8002E084(&this->actor, 0x1554)) {
if (!Actor_IsFacingPlayer(&this->actor, 0x1554)) {
EnGeldB_SetupReady(this);
this->timer = (Rand_ZeroOne() * 5.0f) + 5.0f;
if (ABS(facingAngleToLink) < 0x38E0) {
this->lookTimer = 20;
}
} else if (!func_80033AB8(globalCtx, &this->actor) &&
} else if (!Actor_OtherIsTargeted(globalCtx, &this->actor) &&
(Rand_ZeroOne() > 0.5f || (ABS(facingAngleToLink) < 0x3FFC))) {
EnGeldB_SetupSlash(this);
} else {
@ -614,7 +614,7 @@ void EnGeldB_Pivot(EnGeldB* this, GlobalContext* globalCtx) {
}
this->skelAnime.playSpeed = -playSpeed;
SkelAnime_Update(&this->skelAnime);
if (func_8002E084(&this->actor, 30 * 0x10000 / 360)) {
if (Actor_IsFacingPlayer(&this->actor, 30 * 0x10000 / 360)) {
if (Rand_ZeroOne() > 0.8f) {
EnGeldB_SetupCircle(this);
} else {
@ -717,10 +717,10 @@ void EnGeldB_Circle(EnGeldB* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_BREATH);
}
if ((Math_CosS(angleBehindLink - this->actor.shape.rot.y) < -0.85f) &&
!func_80033AB8(globalCtx, &this->actor) && (this->actor.xzDistToPlayer <= 45.0f)) {
!Actor_OtherIsTargeted(globalCtx, &this->actor) && (this->actor.xzDistToPlayer <= 45.0f)) {
EnGeldB_SetupSlash(this);
} else if (--this->timer == 0) {
if (func_80033AB8(globalCtx, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
if (Actor_OtherIsTargeted(globalCtx, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
EnGeldB_SetupRollBack(this);
} else {
EnGeldB_SetupReady(this);
@ -813,7 +813,7 @@ void EnGeldB_SpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
if (this->timer == 0) {
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
if (!EnGeldB_DodgeRanged(globalCtx, this)) {
if (!func_80033AB8(globalCtx, &this->actor) && (this->actor.xzDistToPlayer <= 70.0f)) {
if (!Actor_OtherIsTargeted(globalCtx, &this->actor) && (this->actor.xzDistToPlayer <= 70.0f)) {
EnGeldB_SetupSlash(this);
} else {
EnGeldB_SetupRollBack(this);
@ -858,7 +858,7 @@ void EnGeldB_Slash(EnGeldB* this, GlobalContext* globalCtx) {
this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
EnGeldB_SetupRollBack(this);
} else if (SkelAnime_Update(&this->skelAnime)) {
if (!func_8002E084(&this->actor, 0x1554)) {
if (!Actor_IsFacingPlayer(&this->actor, 0x1554)) {
EnGeldB_SetupReady(this);
this->timer = (Rand_ZeroOne() * 5.0f) + 5.0f;
if (angleToLink > 0x4000) {
@ -923,8 +923,8 @@ void EnGeldB_SpinAttack(EnGeldB* this, GlobalContext* globalCtx) {
if ((s32)this->skelAnime.curFrame < 9) {
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
} else if ((s32)this->skelAnime.curFrame == 13) {
func_80033260(globalCtx, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
func_80033260(globalCtx, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
this->swordState = 1;
this->actor.speedXZ = 10.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK);
@ -934,7 +934,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, GlobalContext* globalCtx) {
this->swordState = -1;
}
if (SkelAnime_Update(&this->skelAnime) && (this->spinAttackState < 2)) {
if (!func_8002E084(&this->actor, 0x1554)) {
if (!Actor_IsFacingPlayer(&this->actor, 0x1554)) {
EnGeldB_SetupReady(this);
this->timer = (Rand_ZeroOne() * 5.0f) + 5.0f;
this->lookTimer = 46;
@ -980,7 +980,7 @@ void EnGeldB_SetupRollBack(EnGeldB* this) {
void EnGeldB_RollBack(EnGeldB* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
if (!func_80033AB8(globalCtx, &this->actor) && (this->actor.xzDistToPlayer < 170.0f) &&
if (!Actor_OtherIsTargeted(globalCtx, &this->actor) && (this->actor.xzDistToPlayer < 170.0f) &&
(this->actor.xzDistToPlayer > 140.0f) && (Rand_ZeroOne() < 0.2f)) {
EnGeldB_SetupSpinAttack(this);
} else if (globalCtx->gameplayFrames & 1) {
@ -1062,7 +1062,7 @@ void EnGeldB_Damaged(EnGeldB* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 8) && (ABS(angleToWall) < 0x2EE0) && (this->actor.xzDistToPlayer < 90.0f)) {
EnGeldB_SetupJump(this);
} else if (!EnGeldB_DodgeRanged(globalCtx, this)) {
if ((this->actor.xzDistToPlayer <= 45.0f) && !func_80033AB8(globalCtx, &this->actor) &&
if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(globalCtx, &this->actor) &&
(globalCtx->gameplayFrames & 7)) {
EnGeldB_SetupSlash(this);
} else {
@ -1098,7 +1098,7 @@ void EnGeldB_Jump(EnGeldB* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.world.pos.y = this->actor.floorHeight;
if (!func_80033AB8(globalCtx, &this->actor)) {
if (!Actor_OtherIsTargeted(globalCtx, &this->actor)) {
EnGeldB_SetupSlash(this);
} else {
EnGeldB_SetupReady(this);
@ -1144,7 +1144,7 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx) {
}
} else {
angleFacingLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
if (!func_80033AB8(globalCtx, &this->actor) &&
if (!Actor_OtherIsTargeted(globalCtx, &this->actor) &&
((globalCtx->gameplayFrames & 1) || (ABS(angleFacingLink) < 0x38E0))) {
EnGeldB_SetupSlash(this);
} else {
@ -1275,12 +1275,12 @@ void EnGeldB_Sidestep(EnGeldB* this, GlobalContext* globalCtx) {
s16 angleFacingPlayer2 = player2->actor.shape.rot.y - this->actor.shape.rot.y;
this->actor.world.rot.y = this->actor.shape.rot.y;
if ((this->actor.xzDistToPlayer <= 45.0f) && (!func_80033AB8(globalCtx, &this->actor)) &&
if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(globalCtx, &this->actor) &&
(!(globalCtx->gameplayFrames & 3) || (ABS(angleFacingPlayer2) < 0x38E0))) {
EnGeldB_SetupSlash(this);
} else if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) &&
!(globalCtx->gameplayFrames & 1)) {
if (func_80033AB8(globalCtx, &this->actor) || (Rand_ZeroOne() > 0.5f) ||
if (Actor_OtherIsTargeted(globalCtx, &this->actor) || (Rand_ZeroOne() > 0.5f) ||
(ABS(angleFacingPlayer2) < 0x38E0)) {
EnGeldB_SetupRollForward(this);
} else {
@ -1358,7 +1358,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, GlobalContext* globalCtx) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
func_80035650(&this->actor, &this->bodyCollider.info, 1);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, 1);
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) ||
(this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) {
@ -1380,7 +1380,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, GlobalContext* globalCtx) {
}
}
EnGeldB_SetupDefeated(this);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else {
EnGeldB_SetupDamaged(this);
}
@ -1606,7 +1606,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnGeldB_DodgeRanged(GlobalContext* globalCtx, EnGeldB* this) {
Actor* actor = func_80033780(globalCtx, &this->actor, 800.0f);
Actor* actor = Actor_GetProjectileActor(globalCtx, &this->actor, 800.0f);
if (actor != NULL) {
s16 angleToFacing;

View file

@ -333,7 +333,7 @@ void EnGoma_SetupHurt(EnGoma* this, GlobalContext* globalCtx) {
if ((s8)this->actor.colChkInfo.health <= 0) {
this->actionTimer = 5;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else {
this->actionTimer = 10;
}

View file

@ -462,7 +462,7 @@ void EnHintnuts_Freeze(EnHintnuts* this, GlobalContext* globalCtx) {
void EnHintnuts_ColliderCheck(EnHintnuts* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if (this->collider.base.ac->id != ACTOR_EN_NUTSBALL) {
EnHintnuts_SetupBurrow(this);
} else {

View file

@ -285,7 +285,7 @@ Actor* func_80A74674(GlobalContext* globalCtx, Actor* actor) {
if ((prop == actor) || (prop->id != ACTOR_BG_JYA_IRONOBJ)) {
prop = prop->next;
continue;
} else if (func_8002E1A8(actor, prop, 80.0f, 0x2710)) {
} else if (Actor_ActorAIsFacingAndNearActorB(actor, prop, 80.0f, 0x2710)) {
return prop;
}
@ -711,7 +711,7 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
}
sp38 = this->actor.world.pos;
sp38.y += 50.0f;
func_80035650(&this->actor, &this->bodyCollider.info, 1);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, 1);
temp_v0_3 = this->actor.colChkInfo.damageEffect;
this->unk_2FD = temp_v0_3 & 0xFF;
this->bodyCollider.base.acFlags &= ~AC_HIT;
@ -745,7 +745,7 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
if (this->actor.colChkInfo.health == 0) {
func_80A7598C(this);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
return;
}
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x7D0, 0);

View file

@ -272,7 +272,7 @@ void EnKarebaba_Upright(EnKarebaba* this, GlobalContext* globalCtx) {
if (this->bodyCollider.base.acFlags & AC_HIT) {
EnKarebaba_SetupDying(this);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else if (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) > 240.0f) {
EnKarebaba_SetupRetract(this);
} else if (this->actor.params == 0) {
@ -315,7 +315,7 @@ void EnKarebaba_Spin(EnKarebaba* this, GlobalContext* globalCtx) {
if (this->bodyCollider.base.acFlags & AC_HIT) {
EnKarebaba_SetupDying(this);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else if (this->actor.params == 0) {
EnKarebaba_SetupUpright(this);
}

View file

@ -643,7 +643,7 @@ void func_80AA7310(EnMb* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.5f, 1.0f, 0.0f);
if (this->actor.speedXZ > 1.0f) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
}
if (SkelAnime_Update(&this->skelAnime) != 0) {
if (this->unk_32A == 0) {
@ -687,7 +687,7 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 1) {
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
if (1.0f < this->actor.speedXZ) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
}
if (this->unk_32A != 0) {
this->unk_32E--;
@ -753,7 +753,7 @@ void func_80AA77D0(EnMb* this, GlobalContext* globalCtx) {
} else {
this->actor.speedXZ = 10.0f;
this->attackParams = 1;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
if ((currentFrame != (s32)this->skelAnime.curFrame) &&
(((s32)this->skelAnime.curFrame == 2) || ((s32)this->skelAnime.curFrame == 6))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_DASH);
@ -846,7 +846,7 @@ void func_80AA7CAC(EnMb* this, GlobalContext* globalCtx) {
} else {
this->actor.speedXZ = 10.0f;
this->attackParams = 1;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
if (currentFrame != (s32)this->skelAnime.curFrame) {
if (((s32)this->skelAnime.curFrame == 2 || (s32)this->skelAnime.curFrame == 6)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_DASH);
@ -913,7 +913,7 @@ void func_80AA800C(EnMb* this, GlobalContext* globalCtx) {
sp50 = !func_800339B8(&this->actor, globalCtx, 110.0f, this->actor.world.rot.y);
currentFrame = (s32)this->skelAnime.curFrame;
SkelAnime_Update(&this->skelAnime);
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 0x64, 0xF, 0);
if (currentFrame != (s32)this->skelAnime.curFrame) {
if (((s32)this->skelAnime.curFrame == 2) || ((s32)this->skelAnime.curFrame == 6)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_DASH);
@ -1043,7 +1043,7 @@ void func_80AA8514(EnMb* this, GlobalContext* globalCtx) {
}
} else if (((s32)this->skelAnime.curFrame == 15) || ((s32)this->skelAnime.curFrame == 22)) {
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
func_80033260(globalCtx, &this->actor, &effPosition, 50.0f, 0xA, 3.0f, 0x190, 0x3C, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &effPosition, 50.0f, 0xA, 3.0f, 0x190, 0x3C, 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
Camera_AddQuake(&globalCtx->mainCamera, 2, 0x19, 5);
}
@ -1328,7 +1328,7 @@ void func_80AA94D8(EnMb* this, GlobalContext* globalCtx) {
}
this->unk_188 = this->actor.colChkInfo.damageEffect;
this->attackParams = 0;
func_80035650(&this->actor, &this->collider1.info, 0);
Actor_SetDropFlag(&this->actor, &this->collider1.info, 0);
if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 6)) {
if (this->unk_320 != 5) {
Actor_ApplyDamage(&this->actor);

View file

@ -334,7 +334,7 @@ s32 EnNy_CollisionCheck(EnNy* this, GlobalContext* globalCtx) {
this->actor.shape.shadowAlpha = 0;
this->actor.flags &= ~1;
this->unk_1D0 = sp3F;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
return 1;
}
EffectSsHitMark_SpawnFixedScale(globalCtx, 0, &effectPos);

View file

@ -557,9 +557,9 @@ void EnOkuta_UpdateHeadScale(EnOkuta* this) {
void EnOkuta_ColliderCheck(EnOkuta* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.colChkInfo.health = 0;
this->actor.flags &= ~1;
if (this->actor.colChkInfo.damageEffect == 3) {

View file

@ -888,7 +888,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, GlobalContext* globalCtx) {
this->colJntSph.base.acFlags &= ~AC_HIT;
} else if (this->colJntSph.base.acFlags & AC_HIT) {
this->colJntSph.base.acFlags &= ~AC_HIT;
func_8003573C(&this->actor, &this->colJntSph, 1);
Actor_SetDropFlagJntSph(&this->actor, &this->colJntSph, 1);
if (this->actor.colChkInfo.damageEffect == PEAHAT_DMG_EFF_NUT ||
this->actor.colChkInfo.damageEffect == PEAHAT_DMG_EFF_LIGHT_ICE_ARROW) {
return;

View file

@ -728,7 +728,7 @@ void EnPoField_TestForDamage(EnPoField* this, GlobalContext* globalCtx) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DEAD);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DAMAGE);

View file

@ -262,7 +262,7 @@ void EnPoRelay_EndRace(EnPoRelay* this, GlobalContext* globalCtx) {
} else if (globalCtx->roomCtx.curRoom.num == 5) {
Actor_Kill(&this->actor);
gSaveContext.timer1State = 0;
} else if (func_8002E12C(&this->actor, 150.0f, 0x3000) != 0) {
} else if (Actor_IsFacingAndNearPlayer(&this->actor, 150.0f, 0x3000)) {
this->actor.textId = this->textId;
func_8002F2CC(&this->actor, globalCtx, 250.0f);
}

View file

@ -1134,7 +1134,7 @@ void func_80ADC10C(EnPoSisters* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if (this->unk_195 != 0) {
((EnPoSisters*)this->actor.parent)->unk_19C--;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH2);
@ -1163,7 +1163,7 @@ void func_80ADC10C(EnPoSisters* this, GlobalContext* globalCtx) {
if (Actor_ApplyDamage(&this->actor) != 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DAMAGE);
} else {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_SISTER_DEAD);
}
func_80AD95D8(this);

View file

@ -537,7 +537,7 @@ void func_80ADEC9C(EnPoh* this, GlobalContext* globalCtx) {
if (this->actor.xzDistToPlayer > 280.0f) {
EnPoh_SetupIdle(this);
} else if (this->unk_198 == 0 && this->actor.xzDistToPlayer < 140.0f &&
func_8002DFC8(&this->actor, 0x2AAA, globalCtx) == 0) {
!Player_IsFacingActor(&this->actor, 0x2AAA, globalCtx)) {
EnPoh_SetupAttack(this);
}
if (this->lightColor.a == 255) {
@ -866,7 +866,7 @@ void func_80AE032C(EnPoh* this, GlobalContext* globalCtx) {
this->colliderCyl.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DEAD);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DAMAGE);

View file

@ -357,7 +357,7 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
}
if (!this->unk_307 && (Actor_WorldDistXYZToActor(&this->actor, &player->actor) <= 45.0f) &&
func_8002E084(&this->actor, 0x38E3)) {
Actor_IsFacingPlayer(&this->actor, 0x38E3)) {
player->actor.freezeTimer = 0;
if (globalCtx->grabPlayer(globalCtx, player)) {
this->actor.flags &= ~1;
@ -763,7 +763,7 @@ void func_80AE4114(EnRd* this, GlobalContext* globalCtx) {
this->unk_31C = this->actor.colChkInfo.damageEffect;
if (this->unk_31B != 11) {
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if (player->unk_844 != 0) {
this->unk_31D = player->unk_845;
}

View file

@ -200,8 +200,8 @@ void func_80AE5054(EnReeba* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelanime);
if ((globalCtx->gameplayFrames % 4) == 0) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f, 500, 10,
1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f,
500, 10, 1);
}
if (this->unk_278 == 0) {
@ -341,8 +341,8 @@ void func_80AE56E0(EnReeba* this, GlobalContext* globalCtx) {
if ((this->unk_284 + 10.0f) <= this->actor.shape.yOffset) {
if ((globalCtx->gameplayFrames % 4) == 0) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f, 500,
10, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1,
8.0f, 500, 10, 1);
}
Math_ApproachF(&this->actor.shape.yOffset, this->unk_284, 1.0f, this->unk_288);
@ -439,7 +439,7 @@ void func_80AE5A9C(EnReeba* this, GlobalContext* globalCtx) {
}
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_DEAD);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actionfunc = func_80AE5C38;
}
}
@ -546,7 +546,7 @@ void func_80AE5EDC(EnReeba* this, GlobalContext* globalCtx) {
Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_DEAD);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actionfunc = func_80AE5BC4;
} else {
if (this->actionfunc == func_80AE5E48) {

View file

@ -427,7 +427,7 @@ s32 EnSb_UpdateDamage(EnSb* this, GlobalContext* globalCtx) {
this->hitByWindArrow = hitByWindArrow;
BodyBreak_Alloc(&this->bodyBreak, 8, globalCtx);
this->isDead = true;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_SHELL_DEAD);
return 1;
}

View file

@ -237,7 +237,7 @@ void EnShopnuts_SpawnSalesman(EnShopnuts* this, GlobalContext* globalCtx) {
void EnShopnuts_ColliderCheck(EnShopnuts* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
EnShopnuts_SetupSpawnSalesman(this);
} else if (globalCtx->actorCtx.unk_02 != 0) {
EnShopnuts_SetupSpawnSalesman(this);

View file

@ -191,7 +191,7 @@ void EnSkb_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80AFCD60(EnSkb* this) {
if (gSaveContext.nightFlag == 0) {
func_80AFCF48(this);
} else if ((func_8002E084(&this->actor, 0x11C7) != 0) &&
} else if (Actor_IsFacingPlayer(&this->actor, 0x11C7) &&
(this->actor.xzDistToPlayer < (60.0f + (this->actor.params * 6.0f)))) {
func_80AFD33C(this);
} else {
@ -288,7 +288,7 @@ void EnSkb_Advance(EnSkb* this, GlobalContext* globalCtx) {
}
if (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) > 800.0f || gSaveContext.nightFlag == 0) {
func_80AFCF48(this);
} else if ((func_8002E084(&this->actor, 0x11C7) != 0) &&
} else if (Actor_IsFacingPlayer(&this->actor, 0x11C7) &&
(this->actor.xzDistToPlayer < (60.0f + (this->actor.params * 6.0f)))) {
func_80AFD33C(this);
}
@ -447,7 +447,7 @@ void func_80AFD968(EnSkb* this, GlobalContext* globalCtx) {
this->collider.base.acFlags &= ~2;
if (this->actor.colChkInfo.damageEffect != 6) {
this->unk_282 = this->actor.colChkInfo.damageEffect;
func_80035650(&this->actor, &this->collider.elements[1].info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.elements[1].info, 1);
this->unk_281 = 0;
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->unk_280 != 6) {

View file

@ -472,7 +472,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALTU_DAMAGE);
return false;
}
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
this->groundBounces = 3;
this->deathTimer = 20;

View file

@ -338,7 +338,7 @@ s32 func_80B0C9F0(EnSw* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALTU_DAMAGE);
return true;
}
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
if (((this->actor.params & 0xE000) >> 0xD) != 0) {
this->skelAnime.playSpeed = 8.0f;
if ((globalCtx->state.frames & 1) == 0) {
@ -662,7 +662,7 @@ void func_80B0DB00(EnSw* this, GlobalContext* globalCtx) {
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 16.0f, 0xC, 2.0f, 0x78, 0xA, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 16.0f, 0xC, 2.0f, 0x78, 0xA, 0);
}
}

View file

@ -493,7 +493,7 @@ void EnTite_TurnTowardPlayer(EnTite* this, GlobalContext* globalCtx) {
this->actor.shape.rot.y = this->actor.world.rot.y;
if ((this->actor.xzDistToPlayer > 300.0f) && (this->actor.yDistToPlayer > 80.0f)) {
EnTite_SetupIdle(this);
} else if (func_8002E084(&this->actor, 3640)) {
} else if (Actor_IsFacingPlayer(&this->actor, 3640)) {
if ((this->actor.xzDistToPlayer <= 180.0f) && (this->actor.yDistToPlayer <= 80.0f)) {
EnTite_SetupAttack(this);
} else {
@ -814,7 +814,7 @@ void EnTite_FlipOnBack(EnTite* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 3) {
// Upon landing, spawn dust and make noise
if (this->actor.bgCheckFlags & 2) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 20.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 20.0f, 0xB, 4.0f, 0, 0, 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
}
this->vOnBackTimer--;
@ -861,7 +861,7 @@ void EnTite_CheckDamage(Actor* thisx, GlobalContext* globalCtx) {
this->collider.base.acFlags &= ~AC_HIT;
if (thisx->colChkInfo.damageEffect != 0xE) { // Immune to fire magic
this->damageEffect = thisx->colChkInfo.damageEffect;
func_80035650(thisx, &this->collider.elements[0].info, 0);
Actor_SetDropFlag(thisx, &this->collider.elements[0].info, 0);
// Stun if Tektite hit by nut, boomerang, hookshot, ice arrow or ice magic
if ((thisx->colChkInfo.damageEffect == 1) || (thisx->colChkInfo.damageEffect == 0xF)) {
if (this->action != TEKTITE_STUNNED) {

View file

@ -172,7 +172,7 @@ void EnTorch2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
Actor* EnTorch2_GetAttackItem(GlobalContext* globalCtx, Player* this) {
Actor* rangedItem = func_80033780(globalCtx, &this->actor, 4000.0f);
Actor* rangedItem = Actor_GetProjectileActor(globalCtx, &this->actor, 4000.0f);
if (rangedItem != NULL) {
return rangedItem;
@ -266,7 +266,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->skelAnime.playSpeed = 0.0f;
this->actor.world.pos.x = (Math_SinS(this->actor.world.rot.y) * 25.0f) + sSpawnPoint.x;
this->actor.world.pos.z = (Math_CosS(this->actor.world.rot.y) * 25.0f) + sSpawnPoint.z;
if ((this->actor.xzDistToPlayer <= 120.0f) || func_80033A84(globalCtx, &this->actor) ||
if ((this->actor.xzDistToPlayer <= 120.0f) || Actor_IsTargeted(globalCtx, &this->actor) ||
(attackItem != NULL)) {
if (attackItem != NULL) {
sDodgeRollState = 1;
@ -399,7 +399,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
if ((this->swordState == 0) && (sCounterState == 0) && (player->invincibilityTimer == 0) &&
(player->swordAnimation == STAB_1H) && (this->actor.xzDistToPlayer <= 85.0f) &&
func_80033A84(globalCtx, &this->actor)) {
Actor_IsTargeted(globalCtx, &this->actor)) {
sStickTilt = 0.0f;
sSwordJumpState = 1;
@ -618,7 +618,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
sDeathFlag++;
sActionState = ENTORCH2_DEATH;
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xC0);
this->stateFlags3 &= ~4;
} else {
@ -636,7 +636,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_8A0 = this->actor.colChkInfo.damage;
this->unk_8A4 = 8.0f;
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
func_80035650(&this->actor, &this->cylinder.info, 1);
Actor_SetDropFlag(&this->actor, &this->cylinder.info, 1);
this->stateFlags3 &= ~4;
this->stateFlags3 |= 1;
sActionState = ENTORCH2_DAMAGE;

View file

@ -587,7 +587,7 @@ void EnTp_UpdateDamage(EnTp* this, GlobalContext* globalCtx) {
}
this->collider.base.acFlags &= ~AC_HIT;
func_8003573C(&this->actor, &this->collider, 1);
Actor_SetDropFlagJntSph(&this->actor, &this->collider, 1);
this->damageEffect = this->actor.colChkInfo.damageEffect;
if (this->actor.colChkInfo.damageEffect != TAILPASARAN_DMGEFF_NONE) {

View file

@ -498,12 +498,12 @@ void EnVali_ReturnToLurk(EnVali* this, GlobalContext* globalCtx) {
void EnVali_UpdateDamage(EnVali* this, GlobalContext* globalCtx) {
if (this->bodyCollider.base.acFlags & AC_HIT) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->bodyCollider.info, 1);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, 1);
if ((this->actor.colChkInfo.damageEffect != BARI_DMGEFF_NONE) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BARI_DEAD);
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
} else if ((this->actor.colChkInfo.damageEffect != BARI_DMGEFF_STUN) &&
(this->actor.colChkInfo.damageEffect != BARI_DMGEFF_SLINGSHOT)) {

View file

@ -187,7 +187,7 @@ void EnWallmas_SetupLand(EnWallmas* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, objSegChangee, 1.0f, 41.0f, Animation_GetLastFrame(objSegFrameCount),
ANIMMODE_ONCE, -3.0f);
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 0x12C, 0x64, 1);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 0x12C, 0x64, 1);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_LAND);
this->actionFunc = EnWallmas_Land;
}
@ -506,10 +506,10 @@ void EnWallmas_Stun(EnWallmas* this, GlobalContext* globalCtx) {
void EnWallmas_ColUpdate(EnWallmas* this, GlobalContext* globalCtx) {
if ((this->collider.base.acFlags & AC_HIT) != 0) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DEAD);
this->actor.flags &= ~1;
} else {

View file

@ -370,7 +370,7 @@ void func_80B32E34(EnWeiyer* this, GlobalContext* globalCtx) {
(this->collider.base.atFlags & AT_HIT)) {
func_80B32538(this);
} else {
if (func_8002E084(&this->actor, 0x2800)) {
if (Actor_IsFacingPlayer(&this->actor, 0x2800)) {
Math_StepToF(&this->actor.speedXZ, 4.0f, 0.2f);
} else {
Math_StepToF(&this->actor.speedXZ, 1.3f, 0.2f);
@ -392,7 +392,7 @@ void func_80B32E34(EnWeiyer* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0x200, 0x80);
if ((player->actor.yDistToWater < 50.0f) && (this->actor.yDistToWater < 20.0f) &&
func_8002E084(&this->actor, 0x2000)) {
Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_80B327D8(this);
}
}
@ -564,7 +564,7 @@ void func_80B3349C(EnWeiyer* this, GlobalContext* globalCtx) {
void func_80B3368C(EnWeiyer* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_80035650(&this->actor, &this->collider.info, 1);
Actor_SetDropFlag(&this->actor, &this->collider.info, 1);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect == 1) {
@ -572,7 +572,7 @@ void func_80B3368C(EnWeiyer* this, GlobalContext* globalCtx) {
func_80B32660(this);
}
} else if (Actor_ApplyDamage(&this->actor) == 0) {
func_80032C7C(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD);
this->actor.flags &= ~1;
func_80B32724(this);

View file

@ -1268,8 +1268,8 @@ s32 func_80832594(Player* this, s32 arg1, s32 arg2) {
}
void func_80832630(GlobalContext* globalCtx) {
if (globalCtx->actorCtx.unk_00 == 0) {
globalCtx->actorCtx.unk_00 = 1;
if (globalCtx->actorCtx.freezeFlashTimer == 0) {
globalCtx->actorCtx.freezeFlashTimer = 1;
}
}