Rename a lot of actor movement-related functions from decomp (#4680)

This commit is contained in:
Jordan Longstaff 2024-12-14 16:38:24 -05:00 committed by GitHub
parent 3a8ba03ce8
commit bb41931a55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
203 changed files with 355 additions and 355 deletions

View File

@ -398,12 +398,12 @@ void Actor_Kill(Actor* actor);
void Actor_SetFocus(Actor* actor, f32 offset);
void Actor_SetScale(Actor* actor, f32 scale);
void Actor_SetObjectDependency(PlayState* play, Actor* actor);
void func_8002D7EC(Actor* actor);
void func_8002D868(Actor* actor);
void Actor_MoveForward(Actor* actor);
void func_8002D908(Actor* actor);
void func_8002D97C(Actor* actor);
void func_8002D9A4(Actor* actor, f32 arg1);
void Actor_UpdatePos(Actor* actor);
void Actor_UpdateVelocityXZGravity(Actor* actor);
void Actor_MoveXZGravity(Actor* actor);
void Actor_UpdateVelocityXYZ(Actor* actor);
void Actor_MoveXYZ(Actor* actor);
void Actor_SetProjectileSpeed(Actor* actor, f32 arg1);
s16 Actor_WorldYawTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldYawTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
@ -412,7 +412,7 @@ s16 Actor_WorldPitchTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldPitchTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXZToActor(Actor* actorA, Actor* actorB);
f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2);
void Actor_WorldToActorCoords(Actor* actor, Vec3f* result, Vec3f* arg2);
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
f32 Player_GetHeight(Player* player);
s32 Player_ActionHandler_2(Player* player, PlayState* play);

View File

@ -475,7 +475,7 @@ void ItemEtcetera_func_80B85824_Randomized(ItemEtcetera* itemEtcetera, PlayState
void ItemEtcetera_MoveRandomizedFireArrowDown(ItemEtcetera* itemEtcetera, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &itemEtcetera->actor, 10.0f, 10.0f, 0.0f, 5);
Actor_MoveForward(&itemEtcetera->actor);
Actor_MoveXZGravity(&itemEtcetera->actor);
if (!(itemEtcetera->actor.bgCheckFlags & 1)) {
ItemEtcetera_SpawnSparkles(itemEtcetera, play);
}

View File

@ -1255,7 +1255,7 @@ void Actor_Destroy(Actor* actor, PlayState* play) {
NameTag_RemoveAllForActor(actor);
}
void func_8002D7EC(Actor* actor) {
void Actor_UpdatePos(Actor* actor) {
f32 speedRate = R_UPDATE_RATE * 0.5f;
actor->world.pos.x += (actor->velocity.x * speedRate) + actor->colChkInfo.displacement.x;
@ -1263,7 +1263,7 @@ void func_8002D7EC(Actor* actor) {
actor->world.pos.z += (actor->velocity.z * speedRate) + actor->colChkInfo.displacement.z;
}
void func_8002D868(Actor* actor) {
void Actor_UpdateVelocityXZGravity(Actor* actor) {
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ;
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ;
@ -1273,12 +1273,12 @@ void func_8002D868(Actor* actor) {
}
}
void Actor_MoveForward(Actor* actor) {
func_8002D868(actor);
func_8002D7EC(actor);
void Actor_MoveXZGravity(Actor* actor) {
Actor_UpdateVelocityXZGravity(actor);
Actor_UpdatePos(actor);
}
void func_8002D908(Actor* actor) {
void Actor_UpdateVelocityXYZ(Actor* actor) {
f32 sp24 = Math_CosS(actor->world.rot.x) * actor->speedXZ;
actor->velocity.x = Math_SinS(actor->world.rot.y) * sp24;
@ -1286,17 +1286,17 @@ void func_8002D908(Actor* actor) {
actor->velocity.z = Math_CosS(actor->world.rot.y) * sp24;
}
void func_8002D97C(Actor* actor) {
func_8002D908(actor);
func_8002D7EC(actor);
void Actor_MoveXYZ(Actor* actor) {
Actor_UpdateVelocityXYZ(actor);
Actor_UpdatePos(actor);
}
void func_8002D9A4(Actor* actor, f32 arg1) {
void Actor_SetProjectileSpeed(Actor* actor, f32 arg1) {
actor->speedXZ = Math_CosS(actor->world.rot.x) * arg1;
actor->velocity.y = -Math_SinS(actor->world.rot.x) * arg1;
}
void func_8002D9F8(Actor* actor, SkelAnime* skelAnime) {
void Actor_UpdatePosByAnimation(Actor* actor, SkelAnime* skelAnime) {
Vec3f sp1C;
SkelAnime_UpdateTranslation(skelAnime, &sp1C, actor->shape.rot.y);
@ -1345,20 +1345,20 @@ f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint) {
return Math_Vec3f_DistXZ(&actor->world.pos, refPoint);
}
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2) {
f32 cosRot2Y;
f32 sinRot2Y;
void Actor_WorldToActorCoords(Actor* actor, Vec3f* dest, Vec3f* pos) {
f32 cosY;
f32 sinY;
f32 deltaX;
f32 deltaZ;
cosRot2Y = Math_CosS(actor->shape.rot.y);
sinRot2Y = Math_SinS(actor->shape.rot.y);
deltaX = arg2->x - actor->world.pos.x;
deltaZ = arg2->z - actor->world.pos.z;
cosY = Math_CosS(actor->shape.rot.y);
sinY = Math_SinS(actor->shape.rot.y);
deltaX = pos->x - actor->world.pos.x;
deltaZ = pos->z - actor->world.pos.z;
result->x = (deltaX * cosRot2Y) - (deltaZ * sinRot2Y);
result->z = (deltaX * sinRot2Y) + (deltaZ * cosRot2Y);
result->y = arg2->y - actor->world.pos.y;
dest->x = (deltaX * cosY) - (deltaZ * sinY);
dest->z = (deltaX * sinY) + (deltaZ * cosY);
dest->y = pos->y - actor->world.pos.y;
}
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB) {
@ -4603,7 +4603,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
if (Actor_HasParent(actor, play)) {
actor->params = 1;
} else if (!(actor->bgCheckFlags & 1)) {
Actor_MoveForward(actor);
Actor_MoveXZGravity(actor);
Math_SmoothStepToF(&actor->speedXZ, 0.0f, 1.0f, 0.1f, 0.0f);
} else if ((actor->bgCheckFlags & 2) && (actor->velocity.y < -4.0f)) {
ret = 1;

View File

@ -322,7 +322,7 @@ void EnAObj_Update(Actor* thisx, PlayState* play) {
EnAObj* this = (EnAObj*)thisx;
this->actionFunc(this, play);
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
if (this->dyna.actor.gravity != 0.0f) {
if (this->dyna.actor.params != A_OBJ_BOULDER_FRAGMENT) {

View File

@ -831,7 +831,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
} else {
sp3A = 1;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
if (sp3A || D_80157D94[0]) {

View File

@ -88,7 +88,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f);
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f);
Actor_SetProjectileSpeed(&this->actor, 20.0f);
this->actor.parent = &GET_PLAYER(play)->actor;
this->timer = length;
}
@ -250,7 +250,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
} else {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &prevFrameDiff);
Math_Vec3f_Sum(&this->unk_1E8, &prevFrameDiff, &this->unk_1E8);
this->actor.shape.rot.x = Math_Atan2S(this->actor.speedXZ, -this->actor.velocity.y);

View File

@ -869,7 +869,7 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play2) {
}
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->heightOffset = this->scale * 7500.0f;
Actor_SetFocus(&this->actor, this->heightOffset);
this->actor.focus.pos.y = this->heightOffset;

View File

@ -59,7 +59,7 @@ void BgHaka_Destroy(Actor* thisx, PlayState* play) {
void func_8087B758(BgHaka* this, Player* player) {
Vec3f sp1C;
func_8002DBD0(&this->dyna.actor, &sp1C, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->dyna.actor, &sp1C, &player->actor.world.pos);
if (fabsf(sp1C.x) < 34.6f && sp1C.z > -112.8f && sp1C.z < -36.0f) {
player->stateFlags2 |= PLAYER_STATE2_FORCE_SAND_FLOOR_SOUND;
}

View File

@ -190,7 +190,7 @@ void BgHakaShip_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->dyna.actor.params == 0) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
}
}

View File

@ -210,7 +210,7 @@ void func_8087FFC0(BgHakaTrap* this, PlayState* play) {
f32 zNonNegative;
Player* player = GET_PLAYER(play);
func_8002DBD0(&this->dyna.actor, &sp28, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->dyna.actor, &sp28, &player->actor.world.pos);
sine = Math_SinS(this->dyna.actor.shape.rot.y);
cosine = Math_CosS(this->dyna.actor.shape.rot.y);
@ -434,7 +434,7 @@ void func_808809E4(BgHakaTrap* this, PlayState* play, s16 arg2) {
Player* player = GET_PLAYER(play);
Vec3f sp18;
func_8002DBD0(&this->dyna.actor, &sp18, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->dyna.actor, &sp18, &player->actor.world.pos);
if ((fabsf(sp18.x) < 70.0f) && (fabsf(sp18.y) < 100.0f) && (sp18.z < 500.0f) &&
(GET_PLAYER(play)->currentBoots != PLAYER_BOOTS_IRON)) {

View File

@ -396,7 +396,7 @@ void BgHakaZou_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->dyna.actor.params == 3) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
}
}

View File

@ -173,7 +173,7 @@ void BgHeavyBlock_MovePiece(BgHeavyBlock* this, PlayState* play) {
thisx->velocity.x *= 0.98f;
thisx->velocity.z *= 0.98f;
func_8002D7EC(thisx);
Actor_UpdatePos(thisx);
thisx->shape.rot.x += thisx->world.rot.x;
thisx->shape.rot.y += thisx->world.rot.y;
thisx->shape.rot.z += thisx->world.rot.z;
@ -385,7 +385,7 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
Vec3f pos;
f32 raycastResult;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
pos.x = this->dyna.actor.home.pos.x;
pos.y = this->dyna.actor.home.pos.y + 1000.0f;
pos.z = this->dyna.actor.home.pos.z;
@ -459,7 +459,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, PlayState* play) {
Math_StepToF(&this->dyna.actor.velocity.y, 0.0f, 3.0f);
this->dyna.actor.gravity = 0.0f;
this->dyna.actor.world.pos = this->dyna.actor.home.pos;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->dyna.actor.home.pos = this->dyna.actor.world.pos;
switch (this->dyna.actor.params & 0xFF) {
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:

View File

@ -181,7 +181,7 @@ void BgHidanDalm_Update(Actor* thisx, PlayState* play) {
BgHidanDalm* this = (BgHidanDalm*)thisx;
this->actionFunc(this, play);
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 10.0f, 15.0f, 32.0f, 5);
}

View File

@ -86,7 +86,7 @@ s32 BgHidanFirewall_CheckProximity(BgHidanFirewall* this, PlayState* play) {
Vec3f distance;
player = GET_PLAYER(play);
func_8002DBD0(&this->actor, &distance, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &distance, &player->actor.world.pos);
if (fabsf(distance.x) < 100.0f && fabsf(distance.z) < 120.0f) {
return 1;
@ -146,7 +146,7 @@ void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, PlayState* play
player = GET_PLAYER(play);
func_8002DBD0(&this->actor, &sp30, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &sp30, &player->actor.world.pos);
if (sp30.x < -70.0f) {
sp30.x = -70.0f;
} else {

View File

@ -200,7 +200,7 @@ void BgHidanFwbig_MoveCollider(BgHidanFwbig* this, PlayState* play) {
f32 cs;
f32 sn;
func_8002DBD0(&this->actor, &projPos, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &projPos, &player->actor.world.pos);
projPos.z = ((projPos.z >= 0.0f) ? 1.0f : -1.0f) * 25.0f * -1.0f;
if (this->direction == 0) {
projPos.x = CLAMP(projPos.x, -360.0f, 360.0f);

View File

@ -294,7 +294,7 @@ void func_80888860(BgHidanHamstep* this, PlayState* play) {
s32 pad2;
s32 quakeIndex;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
if (((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) < (-20.0f - this->dyna.actor.minVelocityY)) &&
(this->dyna.actor.velocity.y <= 0.0f)) {
@ -343,7 +343,7 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
s32 pad2;
s32 quakeIndex;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
func_80888694(this, (BgHidanHamstep*)this->dyna.actor.parent);
if (((this->dyna.actor.params & 0xFF) <= 0) || ((this->dyna.actor.params & 0xFF) >= 6)) {

View File

@ -125,12 +125,12 @@ void func_80889C18(BgHidanKousi* this, PlayState* play) {
this->dyna.actor.speedXZ = 2.0f;
BgHidanKousi_SetupAction(this, func_80889C90);
}
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
}
void func_80889C90(BgHidanKousi* this, PlayState* play) {
func_8002D7EC(&this->dyna.actor);
Actor_UpdatePos(&this->dyna.actor);
if (D_80889E40[this->dyna.actor.params & 0xFF] <
Math_Vec3f_DistXYZ(&this->dyna.actor.home.pos, &this->dyna.actor.world.pos)) {
func_80889ACC(this);

View File

@ -335,7 +335,7 @@ void BgHidanRock_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actionFunc == func_8088B79C) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
}

View File

@ -175,7 +175,7 @@ void BgIceTurara_Fall(BgIceTurara* this, PlayState* play) {
return;
}
} else {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->dyna.actor.world.pos.y += 40.0f;
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
this->dyna.actor.world.pos.y -= 40.0f;

View File

@ -149,7 +149,7 @@ void BgJyaHaheniron_SetupChairCrumble(BgJyaHaheniron* this) {
void BgJyaHaheniron_ChairCrumble(BgJyaHaheniron* this, PlayState* play) {
Vec3f vec;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 8.0f, 0.0f, 0x85);
if ((this->actor.bgCheckFlags & 9) || ((this->collider.base.atFlags & AT_HIT) && (this->collider.base.at != NULL) &&
(this->collider.base.at->category == ACTORCAT_PLAYER))) {
@ -173,7 +173,7 @@ void BgJyaHaheniron_SetupPillarCrumble(BgJyaHaheniron* this) {
void BgJyaHaheniron_PillarCrumble(BgJyaHaheniron* this, PlayState* play) {
if (this->timer >= 8) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
} else if (this->timer >= 17) {
BgJyaHaheniron_SpawnFragments(play, &this->actor.world.pos, D_808987A0);
Actor_Kill(&this->actor);

View File

@ -331,7 +331,7 @@ void func_8089E650(BgMizuMovebg* this, PlayState* play) {
this->dyna.actor.speedXZ = dist;
}
func_80035844(&this->dyna.actor.world.pos, &waypoint, &this->dyna.actor.world.rot, 1);
func_8002D97C(&this->dyna.actor);
Actor_MoveXYZ(&this->dyna.actor);
dx = waypoint.x - this->dyna.actor.world.pos.x;
dy = waypoint.y - this->dyna.actor.world.pos.y;
dz = waypoint.z - this->dyna.actor.world.pos.z;

View File

@ -162,7 +162,7 @@ void BgMoriBigst_SetupFall(BgMoriBigst* this, PlayState* play) {
}
void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
BgMoriBigst_SetupLanding(this, play);

View File

@ -245,7 +245,7 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* this, PlayState* play) {
static f32 bounceSpeed[3] = { 4.0f, 2.7f, 1.7f };
Actor* thisx = &this->dyna.actor;
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
if ((thisx->bgCheckFlags & 1) && (thisx->velocity.y < 0.0f)) {
if (this->bounceCounter >= ARRAY_COUNT(bounceSpeed)) {
BgMoriHashigo_SetupLadderRest(this);

View File

@ -149,7 +149,7 @@ void BgMoriRakkatenjo_Fall(BgMoriRakkatenjo* this, PlayState* play) {
Actor* thisx = &this->dyna.actor;
s32 quake;
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
if ((thisx->velocity.y < 0.0f) && (thisx->world.pos.y <= 403.0f)) {
if (this->bounceCount >= ARRAY_COUNT(bounceVel)) {
BgMoriRakkatenjo_SetupRest(this);

View File

@ -64,7 +64,7 @@ void BgPushbox_UpdateImpl(BgPushbox* this, PlayState* play) {
: ((this->dyna.actor.speedXZ > 1.0f) ? 1.0f : this->dyna.actor.speedXZ);
Math_StepToF(&this->dyna.actor.speedXZ, 0.0f, 0.2f);
this->dyna.actor.world.rot.y = this->dyna.unk_158;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 40.0f, 40.0f, 0x1D);
}

View File

@ -319,7 +319,7 @@ void func_808B43D0(BgSpot15Rrbox* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
}
Actor_MoveForward(actor);
Actor_MoveXZGravity(actor);
if (actor->world.pos.y <= BGCHECK_Y_MIN + 10.0f) {
// "Lon Lon wooden crate fell too much"

View File

@ -500,7 +500,7 @@ void func_808B5B58(BgSpot16Bombstone* this) {
void func_808B5B6C(BgSpot16Bombstone* this, PlayState* play) {
Actor* actor = &this->actor;
Actor_MoveForward(actor);
Actor_MoveXZGravity(actor);
actor->shape.rot.x += this->unk_210;
actor->shape.rot.z += this->unk_212;

View File

@ -247,7 +247,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Math_StepToF(&this->dyna.actor.speedXZ, 1.2f, 0.1f);
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
func_808B8DDC(this, play);
if (Math3D_Dist2DSq(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z, this->dyna.actor.home.pos.x,

View File

@ -404,7 +404,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) {
this->dyna.actor.home.pos.y = this->dyna.actor.world.pos.y + 80.0f;
BgYdanSp_BurnWeb(this, play);
} else if (player->heldItemAction == PLAYER_IA_DEKU_STICK && player->unk_860 != 0) {
func_8002DBD0(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
Actor_WorldToActorCoords(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
OnePointCutscene_Init(play, 3020, 40, &this->dyna.actor, MAIN_CAM);
Math_Vec3f_Copy(&this->dyna.actor.home.pos, &player->meleeWeaponInfo[0].tip);

View File

@ -1044,7 +1044,7 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) {
thisx->shape.rot.y = thisx->world.rot.y;
Math_SmoothStepToF(&thisx->shape.yOffset, this->unk_228, 1.0f, 100.0f, 0.0f);
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
BossDodongo_UpdateDamage(this, play);
Actor_UpdateBgCheckInfo(play, thisx, 10.0f, 10.0f, 20.0f, 4);
Math_SmoothStepToF(&this->unk_208, 0, 1, 0.001f, 0.0);

View File

@ -950,9 +950,9 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
Math_ApproachF(&this->fwork[BFD_TURN_RATE], this->fwork[BFD_TURN_RATE_MAX], 1.0f, 20000.0f);
Math_ApproachF(&this->actor.speedXZ, this->fwork[BFD_FLY_SPEED], 1.0f, 0.1f);
if (this->work[BFD_ACTION_STATE] < BOSSFD_SKULL_FALL) {
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
}
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
this->work[BFD_LEAD_BODY_SEG]++;
if (this->work[BFD_LEAD_BODY_SEG] >= 100) {

View File

@ -4008,8 +4008,8 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
yDistFromLink = (player->actor.world.pos.y + 40.0f) - this->actor.world.pos.y;
zDistFromLink = player->actor.world.pos.z - this->actor.world.pos.z;
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
switch (this->unk_1C2) {
case 0:
@ -4287,8 +4287,8 @@ void func_808E1EB4(Actor* thisx, PlayState* play2) {
}
}
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
this->unk_1A6++;
@ -4413,8 +4413,8 @@ void func_808E2544(Actor* thisx, PlayState* play) {
}
}
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
this->unk_1A6++;
@ -4501,8 +4501,8 @@ void func_808E2544(Actor* thisx, PlayState* play) {
if ((player->meleeWeaponState != 0) && (player->meleeWeaponAnimation >= 0x18) && (this->actor.xzDistToPlayer < 80.0f)) {
this->unk_1C2 = 0xC;
this->actor.speedXZ = -30.0f;
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
this->unk_1F0 = dorf->unk_1FC;
numEffects = 10;
break;
@ -4518,8 +4518,8 @@ void func_808E2544(Actor* thisx, PlayState* play) {
this->unk_1C2 = 0xC;
this->actor.speedXZ = -30.0f;
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
this->unk_1F0.x = Rand_CenteredFloat(700.0f) + dorf->unk_1FC.x;
this->unk_1F0.y = Rand_CenteredFloat(200.0f) + dorf->unk_1FC.y;

View File

@ -2047,7 +2047,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
if (this->unk_392 != 0) {
this->unk_392--;
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->actor.shape.rot = this->actor.world.rot;
if (this->unk_335 != 0) {
Actor_UpdateBgCheckInfo(play, &this->actor, 60.0f, 60.0f, 100.0f, 5);

View File

@ -720,7 +720,7 @@ void BossGanondrof_Stunned(BossGanondrof* this, PlayState* play) {
this->actor.gravity = 0.0f;
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void BossGanondrof_SetupBlock(BossGanondrof* this, PlayState* play) {
@ -806,8 +806,8 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) {
Math_FAtan2F(vecToLink.y, sqrtf(SQ(vecToLink.x) + SQ(vecToLink.z))) * (0x8000 / M_PI);
}
func_8002D908(thisx);
func_8002D7EC(thisx);
Actor_UpdateVelocityXYZ(thisx);
Actor_UpdatePos(thisx);
Math_ApproachF(&thisx->speedXZ, 10.0f, 1.0f, 0.5f);
if ((sqrtf(SQ(dxCenter) + SQ(dzCenter)) > 280.0f) || (thisx->xyzDistToPlayerSq < SQ(100.0f))) {
this->work[GND_ACTION_STATE] = CHARGE_FINISH;
@ -816,7 +816,7 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) {
break;
case CHARGE_FINISH:
thisx->gravity = 0.2f;
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
osSyncPrintf("YP %f @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n", thisx->world.pos.y);
if (thisx->world.pos.y < 5.0f) {
thisx->world.pos.y = 5.0f;

View File

@ -1935,7 +1935,7 @@ void BossGoma_Update(Actor* thisx, PlayState* play) {
this->actor.shape.rot.y = this->actor.world.rot.y;
if (!this->doNotMoveThisFrame) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
} else {
this->doNotMoveThisFrame = false;
}

View File

@ -1501,7 +1501,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
this->cameraAtVel.z * this->cameraSpeedMod);
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, this->cameraAccel);
} else if (this->csState < MO_INTRO_REVEAL) {
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
this->cameraEye.x += this->actor.velocity.x;
this->cameraEye.y += this->actor.velocity.y;
this->cameraEye.z += this->actor.velocity.z;
@ -2164,12 +2164,12 @@ void BossMo_Core(BossMo* this, PlayState* play) {
spD0 = (s16)(Math_FAtan2F(spD8, sqrtf(SQ(spDC) + SQ(spD4))) * (0x8000 / M_PI));
Math_ApproachS(&this->actor.world.rot.y, spCC, this->tentMaxAngle, this->tentSpeed);
Math_ApproachS(&this->actor.world.rot.x, spD0, this->tentMaxAngle, this->tentSpeed);
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
} else {
this->actor.world.pos.y += this->actor.velocity.y;
this->actor.velocity.y -= 1.0f;
}
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
temp = (this->actor.world.pos.y < -200.0f) ? 5 : 1;
this->actor.world.pos.y -= 20.0f;
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 20.0f, 100.0f, temp);
@ -2346,7 +2346,7 @@ void BossMo_UpdateTent(Actor* thisx, PlayState* play) {
}
}
Math_ApproachS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0xA, 0xC8);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Math_ApproachF(&this->actor.speedXZ, 0.0, 1.0f, 0.02f);
if (BossMo_NearLand(&this->actor.world.pos, 40)) {

View File

@ -1066,8 +1066,8 @@ void BossSst_HeadDeath(BossSst* this, PlayState* play) {
player->actor.world.pos.z = sRoomCenter.z + (400.0f * Math_CosS(this->actor.shape.rot.y)) -
(Math_SinS(this->actor.shape.rot.y) * -120.0f);
player->actor.shape.rot.y = Actor_WorldYawTowardPoint(&player->actor, &sRoomCenter);
func_8002DBD0(&this->actor, &sCameraEye, &GET_ACTIVE_CAM(play)->eye);
func_8002DBD0(&this->actor, &sCameraAt, &GET_ACTIVE_CAM(play)->at);
Actor_WorldToActorCoords(&this->actor, &sCameraEye, &GET_ACTIVE_CAM(play)->eye);
Actor_WorldToActorCoords(&this->actor, &sCameraAt, &GET_ACTIVE_CAM(play)->at);
this->radius = -350.0f;
this->actor.world.pos.x = sRoomCenter.x - (Math_SinS(this->actor.shape.rot.y) * 350.0f);
this->actor.world.pos.z = sRoomCenter.z - (Math_CosS(this->actor.shape.rot.y) * 350.0f);
@ -2652,8 +2652,8 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) {
s32 pad;
BossSst* this = (BossSst*)thisx;
func_8002DBD0(&this->actor, &sHandOffsets[RIGHT], &sHands[RIGHT]->actor.world.pos);
func_8002DBD0(&this->actor, &sHandOffsets[LEFT], &sHands[LEFT]->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &sHandOffsets[RIGHT], &sHands[RIGHT]->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &sHandOffsets[LEFT], &sHands[LEFT]->actor.world.pos);
sHandYawOffsets[LEFT] = sHands[LEFT]->actor.shape.rot.y - thisx->shape.rot.y;
sHandYawOffsets[RIGHT] = sHands[RIGHT]->actor.shape.rot.y - thisx->shape.rot.y;

View File

@ -598,8 +598,8 @@ void BossTw_TurnToPlayer(BossTw* this, PlayState* play) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, this->rotateSpeed);
Math_ApproachS(&this->actor.shape.rot.x, 0, 5, this->rotateSpeed);
Math_ApproachF(&this->rotateSpeed, 4096.0f, 1.0f, 200.0f);
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
if (this->timers[0] == 0) {
if ((otherTw->actionFunc != BossTw_ShootBeam) && this->work[CAN_SHOOT]) {
this->work[CAN_SHOOT] = false;
@ -670,8 +670,8 @@ void BossTw_FlyTo(BossTw* this, PlayState* play) {
Math_ApproachS(&this->actor.shape.rot.x, pitchTarget, 0xA, this->rotateSpeed);
Math_ApproachF(&this->rotateSpeed, 4096.0f, 1.0f, 100.0f);
Math_ApproachF(&this->actor.speedXZ, 10.0f, 1.0f, 1.0f);
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
if ((this->timers[0] == 0) || (xzDist < 70.0f)) {
BossTw_SetupTurnToPlayer(this, play);
@ -2336,8 +2336,8 @@ void BossTw_DeathBall(BossTw* this, PlayState* play) {
Math_ApproachS(&this->actor.world.rot.x, Math_FAtan2F(yDiff, sqrtf(SQ(xDiff) + SQ(zDiff))) * (32768 / M_PI), 5,
this->rotateSpeed);
Math_ApproachS(&this->actor.world.rot.y, yaw, 5, this->rotateSpeed);
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
}
void BossTw_TwinrovaSetupDeathCS(BossTw* this, PlayState* play) {
@ -3928,8 +3928,8 @@ void BossTw_BlastFire(BossTw* this, PlayState* play) {
case 10:
this->blastActive = true;
if (this->timers[0] == 0) {
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_SHOOT_FIRE & ~SFX_FLAG);
} else {
Vec3f velocity;
@ -4118,8 +4118,8 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) {
this->blastActive = true;
if (this->timers[0] == 0) {
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG);
} else {
Vec3f velocity;
@ -5438,7 +5438,7 @@ void BossTw_TwinrovaFly(BossTw* this, PlayState* play) {
Math_ApproachS(&this->actor.shape.rot.y, yaw, 0xA, this->rotateSpeed);
Math_ApproachF(&this->rotateSpeed, 2000.0f, 1.0f, 100.0f);
Math_ApproachF(&this->actor.speedXZ, 30.0f, 1.0f, 2.0f);
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Math_ApproachF(&this->actor.world.pos.x, this->targetPos.x, 0.1f, fabsf(this->actor.velocity.x) * 1.5f);
Math_ApproachF(&this->actor.world.pos.y, this->targetPos.y, 0.1f, fabsf(this->actor.velocity.y) * 1.5f);
Math_ApproachF(&this->targetPos.y, 380.0f, 1.0f, 2.0f);

View File

@ -1308,7 +1308,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) {
this->actor.speedXZ = 0.0f;
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (SkelAnime_Update(&this->skelAnime) && (sFightPhase >= PHASE_4)) {
BossVa_SetupBodyPhase4(this, play);
}
@ -1508,7 +1508,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
}
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 60.0f;
if (((play->gameplayFrames % 2) == 0) && (this->timer == 0)) {

View File

@ -947,7 +947,7 @@ void DemoEffect_UpdateLightRingTriforce(DemoEffect* this, PlayState* play) {
void DemoEffect_UpdateCreationFireball(DemoEffect* this, PlayState* play) {
DemoEffect* effect;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->actor.speedXZ = this->actor.speedXZ + (this->actor.gravity * 0.5f);
if (this->fireBall.timer != 0) {

View File

@ -571,7 +571,7 @@ void DemoGj_InitRubblePile1(DemoGj* this, PlayState* play) {
}
void func_8097A000(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(18));
this->rotationVec.y += (s16)(kREG(19) + 1000);
@ -635,7 +635,7 @@ void DemoGj_InitRubblePile2(DemoGj* this, PlayState* play) {
}
void func_8097A238(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(31));
this->rotationVec.y += (s16)(kREG(32) + 1000);
@ -699,7 +699,7 @@ void DemoGj_InitRubblePile3(DemoGj* this, PlayState* play) {
}
void func_8097A474(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(44));
this->rotationVec.y += (s16)(kREG(45) + 1000);
@ -747,7 +747,7 @@ void DemoGj_InitRubblePile4(DemoGj* this, PlayState* play) {
}
void func_8097A644(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(57));
this->rotationVec.y += (s16)(kREG(58) + 1000);
@ -795,7 +795,7 @@ void DemoGj_InitRubblePile5(DemoGj* this, PlayState* play) {
}
void func_8097A814(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(70));
this->rotationVec.y += (s16)(kREG(71) + 1000);
@ -843,7 +843,7 @@ void DemoGj_InitRubblePile6(DemoGj* this, PlayState* play) {
}
void func_8097A9E4(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(83));
this->rotationVec.y += (s16)(kREG(84) + 1000);
@ -891,7 +891,7 @@ void DemoGj_InitRubblePile7(DemoGj* this, PlayState* play) {
}
void func_8097ABB4(DemoGj* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->rotationVec.x += (s16)(kREG(15));
this->rotationVec.y += (s16)(kREG(14) + 1000);

View File

@ -159,11 +159,11 @@ void func_8097CC08(DemoGo* this) {
} else {
this->actor.speedXZ = (kREG(15) * 0.01f) + 1.2f;
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void func_8097CCC0(DemoGo* this) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void func_8097CCE0(DemoGo* this, PlayState* play) {

View File

@ -68,7 +68,7 @@ f32 func_809946BC(PlayState* play, DoorGerudo* this, f32 arg2, f32 arg3, f32 arg
playerPos.x = player->actor.world.pos.x;
playerPos.y = player->actor.world.pos.y + arg2;
playerPos.z = player->actor.world.pos.z;
func_8002DBD0(&this->dyna.actor, &sp1C, &playerPos);
Actor_WorldToActorCoords(&this->dyna.actor, &sp1C, &playerPos);
if ((arg3 < fabsf(sp1C.x)) || (arg4 < fabsf(sp1C.y))) {
return FLT_MAX;

View File

@ -247,7 +247,7 @@ void DoorKiller_FallAsRubble(DoorKiller* this, PlayState* play) {
} else {
Actor_Kill(&this->actor);
}
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
}
s32 DoorKiller_IsHit(Actor* thisx, PlayState* play) {
@ -374,7 +374,7 @@ void DoorKiller_FallOver(DoorKiller* this, PlayState* play) {
if (!(this->hasHitPlayerOrGround & 1)) {
Vec3f playerPosRelToDoor;
Player* player = GET_PLAYER(play);
func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
if ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
(playerPosRelToDoor.z < 100.0f) && (playerPosRelToDoor.z > 0.0f)) {
this->hasHitPlayerOrGround |= 1;
@ -436,7 +436,7 @@ void DoorKiller_Wait(DoorKiller* this, PlayState* play) {
Vec3f playerPosRelToDoor;
s16 angleToFacingPlayer;
func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
// playerIsOpening is set by player
if (this->playerIsOpening) {

View File

@ -322,7 +322,7 @@ f32 func_80996840(PlayState* play, DoorShutter* this, f32 arg2, f32 arg3, f32 ar
sp28.x = player->actor.world.pos.x;
sp28.y = player->actor.world.pos.y + arg2;
sp28.z = player->actor.world.pos.z;
func_8002DBD0(&this->dyna.actor, &sp1C, &sp28);
Actor_WorldToActorCoords(&this->dyna.actor, &sp1C, &sp28);
if (arg3 < fabsf(sp1C.x) || arg4 < fabsf(sp1C.y)) {
return FLT_MAX;
} else {
@ -543,7 +543,7 @@ void func_80997220(DoorShutter* this, PlayState* play) {
if (this->dyna.actor.room >= 0) {
Vec3f vec;
func_8002DBD0(&this->dyna.actor, &vec, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->dyna.actor, &vec, &player->actor.world.pos);
this->dyna.actor.room =
play->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA].sides[(vec.z < 0.0f) ? 0 : 1].room;
if (room != this->dyna.actor.room) {
@ -600,7 +600,7 @@ void func_80997568(DoorShutter* this, PlayState* play) {
}
void func_809975C0(DoorShutter* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
if (this->dyna.actor.bgCheckFlags & 1) {
DoorShutter_SetupAction(this, func_809976B8);

View File

@ -538,7 +538,7 @@ void EnAm_MoveToHome(EnAm* this, PlayState* play) {
// turn away from a wall if touching one
if ((this->dyna.actor.speedXZ != 0.0f) && (this->dyna.actor.bgCheckFlags & 8)) {
this->dyna.actor.world.rot.y = this->dyna.actor.wallYaw;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
}
SkelAnime_Update(&this->skelAnime);
@ -646,7 +646,7 @@ void EnAm_Lunge(EnAm* this, PlayState* play) {
if ((this->dyna.actor.speedXZ != 0.0f) && (this->dyna.actor.bgCheckFlags & 8)) {
this->dyna.actor.world.rot.y =
(this->dyna.actor.wallYaw - this->dyna.actor.world.rot.y) + this->dyna.actor.wallYaw;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->dyna.actor.bgCheckFlags &= ~8;
}
@ -898,7 +898,7 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
}
}
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 28.0f, 80.0f, 0x1D);
}

View File

@ -249,7 +249,7 @@ void EnAni_Update(Actor* thisx, PlayState* play) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[0] != NULL)) {
switch (this->unk_2AA) {

View File

@ -448,7 +448,7 @@ void EnAnubice_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
this->actor.velocity.y += this->actor.gravity;
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
if (!this->isLinkOutOfRange) {
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 5.0f, 10.0f, 0x1D);

View File

@ -179,7 +179,7 @@ void EnAnubiceFire_Update(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, this->scale);
this->actionFunc(this, play);
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
this->unk_160[0] = this->actor.world.pos;
for (i = 4; i >= 0; i--) {

View File

@ -228,11 +228,11 @@ void EnArrow_Shoot(EnArrow* this, PlayState* play) {
Math_Vec3f_Copy(&this->unk_210, &this->actor.world.pos);
if (this->actor.params >= ARROW_SEED) {
func_8002D9A4(&this->actor, 80.0f);
Actor_SetProjectileSpeed(&this->actor, 80.0f);
this->timer = 15;
this->actor.shape.rot.x = this->actor.shape.rot.y = this->actor.shape.rot.z = 0;
} else {
func_8002D9A4(&this->actor, 150.0f);
Actor_SetProjectileSpeed(&this->actor, 150.0f);
this->timer = 12;
}
}
@ -370,7 +370,7 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
}
} else {
Math_Vec3f_Copy(&this->unk_210, &this->actor.world.pos);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if ((this->touchedPoly =
BgCheck_ProjectileLineTest(&play->colCtx, &this->actor.prevPos, &this->actor.world.pos, &hitPoint,
@ -422,7 +422,7 @@ void func_809B45E0(EnArrow* this, PlayState* play) {
void func_809B4640(EnArrow* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (DECR(this->timer) == 0) {
Actor_Kill(&this->actor);

View File

@ -334,9 +334,9 @@ void EnAttackNiw_Update(Actor* thisx, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
if (this->actionFunc == func_809B5670) {
func_8002D97C(&this->actor);
Actor_MoveXYZ(&this->actor);
} else {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
if (this->actor.floorHeight <= BGCHECK_Y_MIN) {

View File

@ -216,7 +216,7 @@ void EnBa_FallAsBlob(EnBa* this, PlayState* play) {
Actor_Kill(&this->actor);
}
} else {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 28.0f, 80.0f, 5);
}
}

View File

@ -1240,7 +1240,7 @@ void EnBb_Update(Actor* thisx, PlayState* play2) {
this->actionFunc(this, play);
if ((this->actor.params <= ENBB_BLUE) && (this->actor.speedXZ >= -6.0f) &&
((this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) == 0)) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
if (this->moveMode == BBMOVE_NORMAL) {
if ((this->actor.world.pos.y - 20.0f) <= this->actor.floorHeight) {

View File

@ -192,7 +192,7 @@ void EnBdfire_Update(Actor* thisx, PlayState* play) {
this->unk_156++;
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void EnBdfire_DrawFire(EnBdfire* this, PlayState* play) {

View File

@ -503,7 +503,7 @@ void func_809BDC08(EnBigokuta* this, PlayState* play) {
}
phi_v1 = (Actor_WorldDistXZToPoint(&player->actor, &this->actor.home.pos) - 180.0f) * (8.0f / 15);
func_8002DBD0(&this->actor, &sp28, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &sp28, &player->actor.world.pos);
if (fabsf(sp28.x) > 263.0f || ((sp28.z > 0.0f) && !Actor_IsFacingPlayer(&this->actor, 0x1B00) &&
!Player_IsFacingActor(&this->actor, 0x2000, play))) {
phi_v1 -= 0x80;

View File

@ -625,9 +625,9 @@ void EnBili_Update(Actor* thisx, PlayState* play2) {
}
}
if (this->actionFunc == EnBili_Recoil) {
func_8002D97C(&this->actor);
Actor_MoveXYZ(&this->actor);
} else {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, this->collider.dim.radius, this->collider.dim.height, 7);

View File

@ -162,7 +162,7 @@ void EnBom_Move(EnBom* this, PlayState* play) {
this->actor.world.rot.y = ((this->actor.wallYaw - this->actor.world.rot.y) + this->actor.wallYaw) - 0x8000;
}
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMB_BOUND);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->actor.speedXZ *= 0.7f;
this->actor.bgCheckFlags &= ~8;
}
@ -180,7 +180,7 @@ void EnBom_Move(EnBom* this, PlayState* play) {
}
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void EnBom_WaitForRelease(EnBom* this, PlayState* play) {

View File

@ -197,8 +197,8 @@ void EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayStat
// A hack for preventing bombchus from sticking to ledges.
// The visual rotation reverts the sign inversion (shape.rot.x = -world.rot.x).
// The better fix would be making func_8002D908 compute XYZ velocity better,
// or not using it and make the bombchu compute its own velocity.
// The better fix would be making Actor_UpdateVelocityXYZ compute XYZ velocity
// better, or not using it and make the bombchu compute its own velocity.
this->actor.world.rot.x = -this->actor.world.rot.x;
}
}
@ -428,7 +428,7 @@ void EnBomChu_Update(Actor* thisx, PlayState* play2) {
}
this->actionFunc(this, play);
func_8002D97C(&this->actor);
Actor_MoveXYZ(&this->actor);
this->collider.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
this->collider.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y;

View File

@ -335,7 +335,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (thisx->params == BOMBFLOWER_BODY) {
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
}
if (thisx->gravity != 0.0f) {
@ -357,7 +357,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
thisx->world.rot.y = ((thisx->wallYaw - thisx->world.rot.y) + thisx->wallYaw) - 0x8000;
}
Audio_PlayActorSound2(thisx, NA_SE_EV_BOMB_BOUND);
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
DREG(6) = 1;
Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 0.0f, 0x1F);
DREG(6) = 0;

View File

@ -150,8 +150,8 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
}
// Set xyz speed, move forward, and play the boomerang sound
func_8002D9A4(&this->actor, 12.0f);
Actor_MoveForward(&this->actor);
Actor_SetProjectileSpeed(&this->actor, 12.0f);
Actor_MoveXZGravity(&this->actor);
func_8002F974(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG);
// If the boomerang collides with EnItem00 or a Skulltula token, set grabbed pointer to pick it up

View File

@ -13,7 +13,7 @@
/*
set on init unless treasure flag is set
if clear, chest moves (Actor_MoveForward) (falls, likely)
if clear, chest moves (Actor_MoveXZGravity) (falls, likely)
ends up cleared from SWITCH_FLAG_FALL types when switch flag is set
*/
#define ENBOX_MOVE_IMMOBILE (1 << 0)
@ -449,7 +449,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
Flags_SetTreasure(play, this->dyna.actor.params & 0x1F);
} else {
player = GET_PLAYER(play);
func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos);
Actor_WorldToActorCoords(&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 &&
Player_IsFacingActor(&this->dyna.actor, 0x3000, play)) {
Actor_OfferGetItemNearby(&this->dyna.actor, play, -(this->dyna.actor.params >> 5 & 0x7F));
@ -551,7 +551,7 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (!(this->movementFlags & ENBOX_MOVE_IMMOBILE)) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 0x1C);
}

View File

@ -401,7 +401,7 @@ void EnBubble_Regrow(EnBubble* this, PlayState* play) {
void EnBubble_Update(Actor* thisx, PlayState* play) {
EnBubble* this = (EnBubble*)thisx;
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 16.0f, 16.0f, 0.0f, 7);
this->actionFunc(this, play);
Actor_SetFocus(&this->actor, this->actor.shape.yOffset);

View File

@ -414,7 +414,7 @@ void EnButte_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actor.update != NULL) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Math_StepToF(&this->actor.world.pos.y, this->posYTarget, 0.6f);
if (this->actor.xyzDistToPlayerSq < 5000.0f) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);

View File

@ -795,7 +795,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);
if ((this->unk_220 == 4) || (this->unk_220 == 6) || (this->unk_220 == 5) || (this->unk_220 == 1) ||
(this->unk_234 != 0)) {
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
}
Actor_UpdateBgCheckInfo(play, thisx, 20.0f, 30.0f, 21.0f, 0x1F);
}

View File

@ -245,9 +245,9 @@ void EnClearTag_Init(Actor* thisx, PlayState* play) {
this->state = CLEAR_TAG_STATE_LASER;
this->timers[CLEAR_TAG_TIMER_LASER_DEATH] = 70;
this->actor.speedXZ = 35.0f;
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
for (j = 0; j <= 0; j++) {
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
}
this->actor.scale.x = 0.4f;
this->actor.scale.y = 0.4f;
@ -255,7 +255,7 @@ void EnClearTag_Init(Actor* thisx, PlayState* play) {
this->actor.speedXZ = 70.0f;
this->actor.shape.rot.x = -this->actor.shape.rot.x;
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Collider_SetCylinder(play, &this->collider, &this->actor, &sLaserCylinderInit);
Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_REFLECT_MG);
} else { // Initialize the Arwing.
@ -495,7 +495,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
this->actor.shape.rot.x = -this->actor.shape.rot.x;
// Update the Arwing's velocity.
func_8002D908(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
this->actor.velocity.x += this->acceleration.x;
this->actor.velocity.y += this->acceleration.y;
this->actor.velocity.z += this->acceleration.z;
@ -517,7 +517,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
this->crashingTimer--;
}
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
Actor_SetFocus(&this->actor, 0.0f);
@ -562,7 +562,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
break;
case CLEAR_TAG_STATE_LASER:
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
// Check if the laser has hit a target.
if (this->collider.base.atFlags & AT_HIT) {

View File

@ -308,7 +308,7 @@ void EnCow_Update(Actor* thisx, PlayState* play2) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliders[0].base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliders[1].base);
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
Actor_UpdateBgCheckInfo(play, thisx, 0.0f, 0.0f, 0.0f, 4);
if (SkelAnime_Update(&this->skelAnime) != 0) {
if (this->skelAnime.animation == &gCowBodyChewAnim) {

View File

@ -452,10 +452,10 @@ void EnCrow_Update(Actor* thisx, PlayState* play) {
if (this->actionFunc != EnCrow_Respawn) {
if (this->actor.colChkInfo.health != 0) {
height = 20.0f * scale;
func_8002D97C(&this->actor);
Actor_MoveXYZ(&this->actor);
} else {
height = 0.0f;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 12.0f * scale, 25.0f * scale, 50.0f * scale, 7);
} else {

View File

@ -317,7 +317,7 @@ s32 EnCs_HandleWalking(EnCs* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->walkAngle, 1, 2500, 0);
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actor.speedXZ = this->walkSpeed;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
return 0;

View File

@ -545,7 +545,7 @@ void EnDaiku_EscapeRun(EnDaiku* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, ry, 1, 0xFA0, 0);
this->actor.world.rot.y = this->actor.shape.rot.y;
Math_SmoothStepToF(&this->actor.speedXZ, this->runSpeed, 0.6f, dxz, 0.0f);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if (this->subCamActive) {

View File

@ -433,7 +433,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) {
Math_SmoothStepToF(&this->actor.speedXZ, this->runSpeed, 0.8f, runDist, 0.0f);
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (this->flags & 0x40) {
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);

View File

@ -1130,7 +1130,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actionFunc == EnDekubaba_PrunedSomersault) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, this->size * 15.0f, 10.0f, 5);
} else if (this->actionFunc != EnDekubaba_DeadStickDrop) {
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);

View File

@ -480,7 +480,7 @@ void EnDekunuts_Update(Actor* thisx, PlayState* play) {
if (this->actor.params != DEKUNUTS_FLOWER) {
EnDekunuts_ColliderCheck(this, play);
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, this->collider.dim.radius, this->collider.dim.height,
0x1D);
Collider_UpdateCylinder(&this->actor, &this->collider);

View File

@ -512,7 +512,7 @@ void EnDh_Update(Actor* thisx, PlayState* play) {
EnDh_CollisionCheck(this, play);
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 45.0f, 45.0f, 0x1D);
this->actor.focus.pos = this->headPos;
Collider_UpdateCylinder(&this->actor, &this->collider1);

View File

@ -494,7 +494,7 @@ void EnDns_Update(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->actor, 60.0f);
Actor_SetScale(&this->actor, 0.01f);
SkelAnime_Update(&this->skelAnime);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->actionFunc(this, play);
if (this->standOnGround) {
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 20.0f, 4);

View File

@ -425,7 +425,7 @@ void EnDntJiji_Update(Actor* thisx, PlayState* play) {
}
}
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
Collider_UpdateCylinder(&this->actor, &this->collider);
if (this->isSolid != 0) {

View File

@ -814,7 +814,7 @@ void EnDntNomal_Update(Actor* thisx, PlayState* play) {
}
}
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
if (this->type == ENDNTNOMAL_TARGET) {
Collider_SetQuadVertices(&this->targetQuad, &this->targetVtx[0], &this->targetVtx[1], &this->targetVtx[2],

View File

@ -434,7 +434,7 @@ void func_809F74C4(EnDodojr* this, PlayState* play) {
}
void func_809F758C(EnDodojr* this, PlayState* play) {
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
func_809F6730(this, play, &this->actor.world.pos);
if (DECR(this->timer4) == 0) {
@ -491,7 +491,7 @@ void func_809F773C(EnDodojr* this, PlayState* play) {
void func_809F77AC(EnDodojr* this, PlayState* play) {
this->rootScale = 1.2f;
this->rootScale *= ((f32)this->actor.colorFilterTimer / 8);
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
if (func_809F68B0(this, play) != 0) {
this->timer3 = 60;
@ -506,7 +506,7 @@ void func_809F784C(EnDodojr* this, PlayState* play) {
}
void func_809F786C(EnDodojr* this, PlayState* play) {
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
if (func_809F68B0(this, play) != 0) {
func_809F6AC4(this);
@ -539,7 +539,7 @@ void func_809F78EC(EnDodojr* this, PlayState* play) {
void func_809F799C(EnDodojr* this, PlayState* play) {
this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX;
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
if (func_809F68B0(this, play) != 0) {
func_809F6994(this);
@ -563,7 +563,7 @@ void func_809F7A00(EnDodojr* this, PlayState* play) {
}
void func_809F7AB8(EnDodojr* this, PlayState* play) {
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
Math_SmoothStepToS(&this->actor.shape.rot.y, 0, 4, 1000, 10);
this->actor.world.rot.x = this->actor.shape.rot.x;
@ -613,7 +613,7 @@ void EnDodojr_Update(Actor* thisx, PlayState* play) {
EnDodojr* this = (EnDodojr*)thisx;
SkelAnime_Update(&this->skelAnime);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
func_809F70E8(this, play);
if (this->actionFunc != func_809F73AC) {

View File

@ -774,7 +774,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) {
EnDodongo_CollisionCheck(this, play);
if (this->actor.colChkInfo.damageEffect != 0xE) {
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 60.0f, 70.0f, 0x1D);
if (this->actor.bgCheckFlags & 2) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);

View File

@ -484,7 +484,7 @@ void EnDog_Update(Actor* thisx, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Actor_UpdateBgCheckInfo(play, &this->actor, this->collider.dim.radius, this->collider.dim.height * 0.5f, 0.0f,
5);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->actionFunc(this, play);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);

View File

@ -195,7 +195,7 @@ void EnDoor_Idle(EnDoor* this, PlayState* play) {
s16 phi_v0;
doorType = this->actor.params >> 7 & 7;
func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
Actor_WorldToActorCoords(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
if (this->playerIsOpening != 0) {
this->actionFunc = EnDoor_Open;
Animation_PlayOnceSetSpeed(&this->skelAnime, D_809FCECC[this->animStyle],

View File

@ -615,7 +615,7 @@ void EnDu_Update(Actor* thisx, PlayState* play) {
this->actor.world.pos.y += this->actor.velocity.y;
this->actor.world.pos.z += this->actor.velocity.z;
} else {
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);

View File

@ -86,7 +86,7 @@ void EnDyExtra_Update(Actor* thisx, PlayState* play) {
this->actor.scale.z = this->scale.z;
Audio_PlayActorSound2(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG);
this->actionFunc(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void EnDyExtra_Draw(Actor* thisx, PlayState* play) {

View File

@ -648,9 +648,9 @@ void EnEiyer_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actor.world.rot.x == 0 || this->actionFunc == EnEiyer_Stunned) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
} else {
func_8002D97C(&this->actor);
Actor_MoveXYZ(&this->actor);
}
if (this->actionFunc == EnEiyer_Glide || this->actionFunc == EnEiyer_DiveAttack ||

View File

@ -507,14 +507,14 @@ void func_80A02C98(EnElf* this, Vec3f* targetPos, f32 arg2) {
func_80A02BD8(this, targetPos, arg2);
Math_StepToF(&this->actor.velocity.x, xVelTarget, 1.5f);
Math_StepToF(&this->actor.velocity.z, zVelTarget, 1.5f);
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
}
void func_80A02E30(EnElf* this, Vec3f* targetPos) {
func_80A02BD8(this, targetPos, 0.2f);
this->actor.velocity.x = (targetPos->x + this->unk_28C.x) - this->actor.world.pos.x;
this->actor.velocity.z = (targetPos->z + this->unk_28C.z) - this->actor.world.pos.z;
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
this->actor.world.pos.x = targetPos->x + this->unk_28C.x;
this->actor.world.pos.z = targetPos->z + this->unk_28C.z;
}
@ -522,7 +522,7 @@ void func_80A02E30(EnElf* this, Vec3f* targetPos) {
void func_80A02EC0(EnElf* this, Vec3f* targetPos) {
func_80A02BD8(this, targetPos, 0.2f);
this->actor.velocity.x = this->actor.velocity.z = 0.0f;
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
this->actor.world.pos.x = targetPos->x + this->unk_28C.x;
this->actor.world.pos.z = targetPos->z + this->unk_28C.z;
}
@ -569,7 +569,7 @@ void func_80A03018(EnElf* this, PlayState* play) {
Math_SmoothStepToS(&this->unk_2BC, targetYaw, 10, this->unk_2AC, 0x20);
this->actor.world.rot.y = this->unk_2BC;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
@ -597,7 +597,7 @@ void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
Math_StepToF(&this->actor.velocity.x, xVelTarget, 5.0f);
Math_StepToF(&this->actor.velocity.z, zVelTarget, 5.0f);
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
}
void func_80A0329C(EnElf* this, PlayState* play) {

View File

@ -337,7 +337,7 @@ void EnExItem_ExitChest(EnExItem* this, PlayState* play) {
Actor_Kill(&this->actor);
}
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
void EnExItem_FairyMagic(EnExItem* this, PlayState* play) {

View File

@ -370,7 +370,7 @@ void EnExRuppy_Update(Actor* thisx, PlayState* play) {
if (this->timer != 0) {
this->timer--;
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f, 0x1C);
}

View File

@ -681,7 +681,7 @@ void EnFd_Update(Actor* thisx, PlayState* play) {
} else if (this->actionFunc != EnFd_WaitForCore) {
EnFd_ColliderCheck(this, play);
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
EnFd_Fade(this, play);
this->actionFunc(this, play);

View File

@ -193,13 +193,13 @@ void EnFdFire_DanceTowardsPlayer(EnFdFire* this, PlayState* play) {
if (this->actor.speedXZ < 0.1f) {
this->actor.speedXZ = 5.0f;
}
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
}
}
void EnFdFire_Disappear(EnFdFire* this, PlayState* play) {
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.6f, 9.0f, 0.0f);
func_8002D868(&this->actor);
Actor_UpdateVelocityXZGravity(&this->actor);
Math_SmoothStepToF(&this->scale, 0.0f, 0.3f, 0.1f, 0.0f);
this->actor.shape.shadowScale = 20.0f;
this->actor.shape.shadowScale *= (this->scale / 3.0f);
@ -218,7 +218,7 @@ void EnFdFire_Update(Actor* thisx, PlayState* play) {
}
}
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
this->actionFunc(this, play);
Actor_UpdateBgCheckInfo(play, &this->actor, 12.0f, 10.0f, 0.0f, 5);

View File

@ -296,7 +296,7 @@ void EnFhgFire_LightningShock(EnFhgFire* this, PlayState* play) {
EffectSsFhgFlash_SpawnShock(play, &this->actor, &pos, 200, FHGFLASH_SHOCK_NO_ACTOR);
}
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Collider_UpdateCylinder(&this->actor, &this->collider);
if (player->invincibilityTimer == 0) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
@ -440,8 +440,8 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
dxL = player->actor.world.pos.x - this->actor.world.pos.x;
dyL = player->actor.world.pos.y + 40.0f - this->actor.world.pos.y;
dzL = player->actor.world.pos.z - this->actor.world.pos.z;
func_8002D908(&this->actor);
func_8002D7EC(&this->actor);
Actor_UpdateVelocityXYZ(&this->actor);
Actor_UpdatePos(&this->actor);
if (this->work[FHGFIRE_VARIANCE_TIMER] & 1) {
Actor_SetScale(&this->actor, 6.0f);
} else {

View File

@ -336,7 +336,7 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) {
thisx->gravity = -0.3f - (this->scale * 7.0f);
}
if (this->type != FIRE_ROCK_ON_FLOOR) {
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
Actor_UpdateBgCheckInfo(play, thisx, 50.0f, 50.0f, 100.0f, 0x1C);
}

View File

@ -692,12 +692,12 @@ void EnFirefly_Update(Actor* thisx, PlayState* play2) {
if (!(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) {
if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
} else {
if (this->actionFunc != EnFirefly_Rebound) {
this->actor.world.rot.x = 0x1554 - this->actor.shape.rot.x;
}
func_8002D97C(&this->actor);
Actor_MoveXYZ(&this->actor);
}
}

View File

@ -692,7 +692,7 @@ void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) {
}
if ((this->actionFunc == NULL) || (this->actionFunc(this, play), (this->actor.update != NULL))) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (this->unk_250 != 0) {
Actor_UpdateBgCheckInfo(play, &this->actor, 17.5f, 4.0f, 0.0f, this->unk_250);
@ -731,7 +731,7 @@ void EnFish_RespawningUpdate(EnFish* this, PlayState* play) {
}
if ((this->actionFunc == NULL) || (this->actionFunc(this, play), (this->actor.update != NULL))) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (this->respawnTimer == 20) {
this->actor.draw = EnFish_Draw;

View File

@ -1052,7 +1052,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
}
if (this->actionFunc != EnFloormas_GrabLink) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, this->actor.scale.x * 3000.0f, 0.0f, 0x1D);

View File

@ -583,7 +583,7 @@ void EnFr_UpdateActive(Actor* thisx, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
SkelAnime_Update(&this->skelAnimeButterfly);
EnFr_ButterflyPath(this, play);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}
}

View File

@ -252,7 +252,7 @@ void EnFu_Update(Actor* thisx, PlayState* play) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if ((!(this->behaviorFlags & FU_WAIT)) && (SkelAnime_Update(&this->skelanime) != 0)) {
Animation_Change(&this->skelanime, this->skelanime.animation, 1.0f, 0.0f,

View File

@ -367,7 +367,7 @@ void EnFw_Update(Actor* thisx, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
// not attached to hookshot.
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 20.0f, 0.0f, 5);
this->actionFunc(this, play);
if (this->damageTimer == 0 && this->explosionTimer == 0 && this->actionFunc == EnFw_Run) {

View File

@ -698,7 +698,7 @@ void EnFz_Update(Actor* thisx, PlayState* play) {
}
Math_StepToF(&this->actor.speedXZ, this->speedXZ, 0.2f);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (this->updateBgInfo) {
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 20.0f, 5);

View File

@ -278,7 +278,7 @@ void EnGSwitch_GalleryRupee(EnGSwitch* this, PlayState* play) {
if (this->delayTimer == 0) {
switch (this->moveMode) {
case GSWITCH_THROW:
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if ((this->actor.velocity.y < 0.0f) && (this->actor.world.pos.y < (this->actor.home.pos.y - 50.0f))) {
gallery = ((EnSyatekiItm*)this->actor.parent);
this->actor.velocity.y = 0.0f;
@ -290,7 +290,7 @@ void EnGSwitch_GalleryRupee(EnGSwitch* this, PlayState* play) {
}
break;
case GSWITCH_LEFT:
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
if ((this->actor.velocity.x < 0.0f) && (this->actor.world.pos.x < this->targetPos.x)) {
gallery = ((EnSyatekiItm*)this->actor.parent);
if (gallery->actor.update != NULL) {
@ -300,7 +300,7 @@ void EnGSwitch_GalleryRupee(EnGSwitch* this, PlayState* play) {
}
break;
case GSWITCH_RIGHT:
func_8002D7EC(&this->actor);
Actor_UpdatePos(&this->actor);
if (this->actor.world.pos.x > this->targetPos.x) {
gallery = ((EnSyatekiItm*)this->actor.parent);
if (gallery->actor.update != NULL) {
@ -433,7 +433,7 @@ void EnGSwitch_Update(Actor* thisx, PlayState* play) {
}
if ((this->type != ENGSWITCH_SILVER_TRACKER) && (this->type != ENGSWITCH_SILVER_RUPEE) &&
(this->type != ENGSWITCH_TARGET_RUPEE)) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 0x1C);
}
if (this->actor.draw != NULL) {

View File

@ -754,7 +754,7 @@ void EnGe1_Update(Actor* thisx, PlayState* play) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 40.0f, 25.0f, 40.0f, 5);
this->animFunc(this);
this->actionFunc(this, play);

View File

@ -516,7 +516,7 @@ void EnGe2_MaintainColliderAndSetAnimState(EnGe2* this, PlayState* play) {
}
void EnGe2_MoveAndBlink(EnGe2* this, PlayState* play) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
if (DECR(this->blinkTimer) == 0) {
this->blinkTimer = Rand_S16Offset(60, 60);

Some files were not shown because too many files have changed in this diff Show More