mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 20:44:41 -04:00
pull decomp changes: actor functions, z_en_horse.c (#6877)
This commit is contained in:
+94
-94
@@ -292,7 +292,7 @@ void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* lef
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002BE04(PlayState* play, Vec3f* arg1, Vec3f* arg2, f32* arg3) {
|
||||
void Actor_ProjectPos(PlayState* play, Vec3f* arg1, Vec3f* arg2, f32* arg3) {
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, arg1, arg2, arg3);
|
||||
*arg3 = (*arg3 < 1.0f) ? 1.0f : (1.0f / *arg3);
|
||||
}
|
||||
@@ -326,14 +326,14 @@ Gfx D_80115FF0[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
void func_8002BE64(TargetContext* targetCtx, s32 index, f32 arg2, f32 arg3, f32 arg4) {
|
||||
void Attention_SetReticlePos(TargetContext* targetCtx, s32 index, f32 arg2, f32 arg3, f32 arg4) {
|
||||
targetCtx->arr_50[index].pos.x = arg2;
|
||||
targetCtx->arr_50[index].pos.y = arg3;
|
||||
targetCtx->arr_50[index].pos.z = arg4;
|
||||
targetCtx->arr_50[index].unk_0C = targetCtx->unk_44;
|
||||
}
|
||||
|
||||
void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play) {
|
||||
void Attention_InitReticle(TargetContext* targetCtx, s32 actorCategory, PlayState* play) {
|
||||
TargetContextEntry* entry;
|
||||
NaviColor* naviColor;
|
||||
s32 i;
|
||||
@@ -346,7 +346,7 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play)
|
||||
|
||||
entry = &targetCtx->arr_50[0];
|
||||
for (i = 0; i < ARRAY_COUNT(targetCtx->arr_50); i++) {
|
||||
func_8002BE64(targetCtx, i, 0.0f, 0.0f, 0.0f);
|
||||
Attention_SetReticlePos(targetCtx, i, 0.0f, 0.0f, 0.0f);
|
||||
entry->color.r = naviColor->inner.r;
|
||||
entry->color.g = naviColor->inner.g;
|
||||
entry->color.b = naviColor->inner.b;
|
||||
@@ -354,7 +354,7 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play)
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, PlayState* play) {
|
||||
void Attention_SetNaviState(TargetContext* targetCtx, Actor* actor, s32 actorCategory, PlayState* play) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdlePrimaryColor);
|
||||
@@ -427,7 +427,7 @@ void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, Pl
|
||||
targetCtx->naviOuter.a = naviColor->outer.a;
|
||||
}
|
||||
|
||||
void func_8002C0C0(TargetContext* targetCtx, Actor* actor, PlayState* play) {
|
||||
void Attention_Init(TargetContext* targetCtx, Actor* actor, PlayState* play) {
|
||||
targetCtx->arrowPointedActor = NULL;
|
||||
targetCtx->targetedActor = NULL;
|
||||
targetCtx->unk_40 = 0.0f;
|
||||
@@ -435,11 +435,11 @@ void func_8002C0C0(TargetContext* targetCtx, Actor* actor, PlayState* play) {
|
||||
targetCtx->bgmEnemy = NULL;
|
||||
targetCtx->unk_4B = 0;
|
||||
targetCtx->unk_4C = 0;
|
||||
func_8002BF60(targetCtx, actor, actor->category, play);
|
||||
func_8002BE98(targetCtx, actor->category, play);
|
||||
Attention_SetNaviState(targetCtx, actor, actor->category, play);
|
||||
Attention_InitReticle(targetCtx, actor->category, play);
|
||||
}
|
||||
|
||||
void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
void Attention_Draw(TargetContext* targetCtx, PlayState* play) {
|
||||
Actor* actor = targetCtx->targetedActor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
@@ -481,7 +481,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
spCE = targetCtx->unk_48;
|
||||
}
|
||||
|
||||
func_8002BE04(play, &targetCtx->targetCenterPos, &spBC, &spB4);
|
||||
Actor_ProjectPos(play, &targetCtx->targetCenterPos, &spBC, &spB4);
|
||||
|
||||
spBC.x = (160 * (spBC.x * spB4)) * var1;
|
||||
spBC.x = CLAMP(spBC.x, -320.0f, 320.0f);
|
||||
@@ -496,7 +496,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
targetCtx->unk_4C = 2;
|
||||
}
|
||||
|
||||
func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
|
||||
Attention_SetReticlePos(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
|
||||
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_TALKING)) || (actor != player->focusActor)) {
|
||||
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39);
|
||||
@@ -558,7 +558,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, PlayState* play) {
|
||||
void Attention_Update(TargetContext* targetCtx, Player* player, Actor* actorArg, PlayState* play) {
|
||||
s32 pad;
|
||||
Actor* unkActor;
|
||||
s32 actorCategory;
|
||||
@@ -577,7 +577,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
|
||||
if ((player->focusActor != NULL) && (player->controlStickDirections[player->controlStickDataIndex] == 2)) {
|
||||
targetCtx->unk_94 = NULL;
|
||||
} else {
|
||||
func_80032AF0(play, &play->actorCtx, &unkActor, player);
|
||||
Attention_FindActor(play, &play->actorCtx, &unkActor, player);
|
||||
targetCtx->unk_94 = unkActor;
|
||||
}
|
||||
|
||||
@@ -613,11 +613,11 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
|
||||
targetCtx->naviRefPos.y += temp3 * temp1;
|
||||
targetCtx->naviRefPos.z += temp4 * temp1;
|
||||
} else {
|
||||
func_8002BF60(targetCtx, unkActor, actorCategory, play);
|
||||
Attention_SetNaviState(targetCtx, unkActor, actorCategory, play);
|
||||
}
|
||||
|
||||
if ((actorArg != NULL) && (targetCtx->unk_4B == 0)) {
|
||||
func_8002BE04(play, &actorArg->focus.pos, &sp50, &sp4C);
|
||||
Actor_ProjectPos(play, &actorArg->focus.pos, &sp50, &sp4C);
|
||||
if (((sp50.z <= 0.0f) || (1.0f <= fabsf(sp50.x * sp4C))) || (1.0f <= fabsf(sp50.y * sp4C))) {
|
||||
actorArg = NULL;
|
||||
}
|
||||
@@ -625,7 +625,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
|
||||
|
||||
if (actorArg != NULL) {
|
||||
if (actorArg != targetCtx->targetedActor) {
|
||||
func_8002BE98(targetCtx, actorArg->category, play);
|
||||
Attention_InitReticle(targetCtx, actorArg->category, play);
|
||||
targetCtx->targetedActor = actorArg;
|
||||
|
||||
if (actorArg->id == ACTOR_EN_BOOM) {
|
||||
@@ -834,7 +834,7 @@ void Flags_SetCollectible(PlayState* play, s32 flag) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002CDE4(PlayState* play, TitleCardContext* titleCtx) {
|
||||
void TitleCard_Init(PlayState* play, TitleCardContext* titleCtx) {
|
||||
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensityR = titleCtx->alpha = 0;
|
||||
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensityG = titleCtx->alpha = 0;
|
||||
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensityB = titleCtx->alpha = 0;
|
||||
@@ -1188,7 +1188,7 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_8002D53C(PlayState* play, TitleCardContext* titleCtx) {
|
||||
s32 TitleCard_Clear(PlayState* play, TitleCardContext* titleCtx) {
|
||||
if ((play->actorCtx.titleCtx.delayTimer != 0) || (play->actorCtx.titleCtx.alpha != 0)) {
|
||||
titleCtx->durationTimer = 0;
|
||||
titleCtx->delayTimer = 0;
|
||||
@@ -1444,7 +1444,7 @@ s32 func_8002DDF4(PlayState* play) {
|
||||
return player->stateFlags2 & PLAYER_STATE2_STATIONARY_LADDER;
|
||||
}
|
||||
|
||||
void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
|
||||
void Actor_SwapHookshotAttachment(PlayState* play, Actor* actorA, Actor* actorB) {
|
||||
ArmsHook* hookshot = (ArmsHook*)Actor_Find(&play->actorCtx, ACTOR_ARMS_HOOK, ACTORCAT_ITEMACTION);
|
||||
|
||||
hookshot->grabbed = actorB;
|
||||
@@ -1455,7 +1455,7 @@ void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
|
||||
actorA->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
|
||||
}
|
||||
|
||||
void func_8002DE74(PlayState* play, Player* player) {
|
||||
void Actor_RequestHorseCameraSetting(PlayState* play, Player* player) {
|
||||
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && func_800C0CB8(play)) {
|
||||
Camera_ChangeSetting(Play_GetCamera(play, MAIN_CAM), CAM_SET_HORSE);
|
||||
}
|
||||
@@ -1471,11 +1471,11 @@ s32 func_8002DEEC(Player* player) {
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (player->csAction != 0);
|
||||
}
|
||||
|
||||
void func_8002DF18(PlayState* play, Player* player) {
|
||||
void Actor_InitPlayerHorse(PlayState* play, Player* player) {
|
||||
Horse_InitPlayerHorse(play, player);
|
||||
}
|
||||
|
||||
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) {
|
||||
s32 Player_SetCsAction(PlayState* play, Actor* actor, u8 csAction) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->csAction = csAction;
|
||||
@@ -1488,7 +1488,7 @@ s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) {
|
||||
s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* actor, u8 csAction) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_8002DF38(play, actor, csAction);
|
||||
Player_SetCsAction(play, actor, csAction);
|
||||
player->cv.haltActorsDuringCsAction = true;
|
||||
|
||||
return true;
|
||||
@@ -1881,7 +1881,7 @@ PosRot* Actor_GetWorldPosShapeRot(PosRot* arg0, Actor* actor) {
|
||||
return arg0;
|
||||
}
|
||||
|
||||
f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
|
||||
f32 Attention_WeightedDistToPlayerSq(Actor* actor, Player* player, s16 arg2) {
|
||||
s16 yawTemp = (s16)(actor->yawTowardsPlayer - 0x8000) - arg2;
|
||||
s16 yawTempAbs = ABS(yawTemp);
|
||||
|
||||
@@ -1917,11 +1917,11 @@ TargetRangeParams D_80115FF8[] = {
|
||||
TARGET_RANGE(240, 576), TARGET_RANGE(280, 280000),
|
||||
};
|
||||
|
||||
u32 func_8002F090(Actor* actor, f32 arg1) {
|
||||
u32 Attention_ActorIsInRange(Actor* actor, f32 arg1) {
|
||||
return arg1 < D_80115FF8[actor->targetMode].rangeSq;
|
||||
}
|
||||
|
||||
s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
|
||||
s32 Attention_ShouldReleaseLockOn(Actor* actor, Player* player, s32 flag) {
|
||||
if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_ATTENTION_ENABLED)) {
|
||||
return true;
|
||||
}
|
||||
@@ -1937,7 +1937,7 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
|
||||
dist = actor->xyzDistToPlayerSq;
|
||||
}
|
||||
|
||||
return !func_8002F090(actor, D_80115FF8[actor->targetMode].leashScale * dist);
|
||||
return !Attention_ActorIsInRange(actor, D_80115FF8[actor->targetMode].leashScale * dist);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1952,7 +1952,7 @@ u32 Actor_ProcessTalkRequest(Actor* actor, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchangeItemId) {
|
||||
s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchangeItemId) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
// This is convoluted but it seems like it must be a single if statement to match
|
||||
@@ -1970,18 +1970,18 @@ s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchang
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_8002F298(Actor* actor, PlayState* play, f32 arg2, u32 exchangeItemId) {
|
||||
return func_8002F1C4(actor, play, arg2, arg2, exchangeItemId);
|
||||
s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, PlayState* play, f32 arg2, u32 exchangeItemId) {
|
||||
return Actor_OfferTalkExchange(actor, play, arg2, arg2, exchangeItemId);
|
||||
}
|
||||
|
||||
s32 func_8002F2CC(Actor* actor, PlayState* play, f32 arg2) {
|
||||
return func_8002F298(actor, play, arg2, EXCH_ITEM_NONE);
|
||||
s32 Actor_OfferTalk(Actor* actor, PlayState* play, f32 arg2) {
|
||||
return Actor_OfferTalkExchangeEquiCylinder(actor, play, arg2, EXCH_ITEM_NONE);
|
||||
}
|
||||
|
||||
s32 func_8002F2F4(Actor* actor, PlayState* play) {
|
||||
s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, PlayState* play) {
|
||||
f32 var1 = 50.0f + actor->colChkInfo.cylRadius;
|
||||
|
||||
return func_8002F2CC(actor, play, var1);
|
||||
return Actor_OfferTalk(actor, play, var1);
|
||||
}
|
||||
|
||||
u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
|
||||
@@ -1992,7 +1992,7 @@ u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
s8 func_8002F368(PlayState* play) {
|
||||
s8 Actor_GetPlayerExchangeItemId(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return player->exchangeItemId;
|
||||
@@ -2002,7 +2002,7 @@ void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y) {
|
||||
Vec3f projectedPos;
|
||||
f32 w;
|
||||
|
||||
func_8002BE04(play, &actor->focus.pos, &projectedPos, &w);
|
||||
Actor_ProjectPos(play, &actor->focus.pos, &projectedPos, &w);
|
||||
*x = projectedPos.x * w * (SCREEN_WIDTH / 2) + (SCREEN_WIDTH / 2);
|
||||
*y = projectedPos.y * w * -(SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT / 2);
|
||||
}
|
||||
@@ -2173,7 +2173,7 @@ void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play) {
|
||||
actorA->parent = NULL;
|
||||
}
|
||||
|
||||
void func_8002F5F0(Actor* actor, PlayState* play) {
|
||||
void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (actor->xyzDistToPlayerSq < player->closestSecretDistSq) {
|
||||
@@ -2212,7 +2212,7 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
|
||||
void Actor_SetPlayerKnockback(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->knockbackDamage = arg6;
|
||||
@@ -2222,20 +2222,20 @@ void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4,
|
||||
player->knockbackYVelocity = arg4;
|
||||
}
|
||||
|
||||
void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
|
||||
func_8002F698(play, actor, arg2, arg3, arg4, 2, arg5);
|
||||
void Actor_SetPlayerKnockbackLarge(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
|
||||
Actor_SetPlayerKnockback(play, actor, arg2, arg3, arg4, 2, arg5);
|
||||
}
|
||||
|
||||
void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
|
||||
func_8002F6D4(play, actor, arg2, arg3, arg4, 0);
|
||||
void Actor_SetPlayerKnockbackLargeNoDamage(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
|
||||
Actor_SetPlayerKnockbackLarge(play, actor, arg2, arg3, arg4, 0);
|
||||
}
|
||||
|
||||
void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
|
||||
func_8002F698(play, actor, arg2, arg3, arg4, 1, arg5);
|
||||
void Actor_SetPlayerKnockbackSmall(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
|
||||
Actor_SetPlayerKnockback(play, actor, arg2, arg3, arg4, 1, arg5);
|
||||
}
|
||||
|
||||
void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
|
||||
func_8002F758(play, actor, arg2, arg3, arg4, 0);
|
||||
void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
|
||||
Actor_SetPlayerKnockbackSmall(play, actor, arg2, arg3, arg4, 0);
|
||||
}
|
||||
|
||||
void Player_PlaySfx(Actor* actor, u16 sfxId) {
|
||||
@@ -2262,7 +2262,7 @@ void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
|
||||
Sfx_PlaySfxAtPos(&actor->projectedPos, sfxId);
|
||||
}
|
||||
|
||||
void func_8002F850(PlayState* play, Actor* actor) {
|
||||
void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor) {
|
||||
s32 sfxId;
|
||||
|
||||
if (actor->bgCheckFlags & 0x20) {
|
||||
@@ -2279,31 +2279,31 @@ void func_8002F850(PlayState* play, Actor* actor) {
|
||||
Sfx_PlaySfxAtPos(&actor->projectedPos, sfxId + SFX_FLAG);
|
||||
}
|
||||
|
||||
void func_8002F8F0(Actor* actor, u16 sfxId) {
|
||||
void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId) {
|
||||
actor->sfx = sfxId;
|
||||
actor->flags |= ACTOR_FLAG_SFX_ACTOR_POS_2;
|
||||
actor->flags &= ~(ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_FLAG_SFX_TIMER);
|
||||
}
|
||||
|
||||
void func_8002F91C(Actor* actor, u16 sfxId) {
|
||||
void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId) {
|
||||
actor->sfx = sfxId;
|
||||
actor->flags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_1;
|
||||
actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_FLAG_SFX_TIMER);
|
||||
}
|
||||
|
||||
void func_8002F948(Actor* actor, u16 sfxId) {
|
||||
void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) {
|
||||
actor->sfx = sfxId;
|
||||
actor->flags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2;
|
||||
actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_FLAG_SFX_TIMER);
|
||||
}
|
||||
|
||||
void func_8002F974(Actor* actor, u16 sfxId) {
|
||||
void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId) {
|
||||
actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 |
|
||||
ACTOR_FLAG_SFX_TIMER);
|
||||
actor->sfx = sfxId;
|
||||
}
|
||||
|
||||
void func_8002F994(Actor* actor, s32 arg1) {
|
||||
void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 arg1) {
|
||||
actor->flags |= ACTOR_FLAG_SFX_TIMER;
|
||||
actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2);
|
||||
if (arg1 < 40) {
|
||||
@@ -2317,7 +2317,7 @@ void func_8002F994(Actor* actor, s32 arg1) {
|
||||
|
||||
// Tests if something hit Jabu Jabu surface, displaying hit splash and playing sfx if true
|
||||
s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) {
|
||||
if (func_80041D4C(&play->colCtx, poly, bgId) == 8) {
|
||||
if (SurfaceType_GetFloorType(&play->colCtx, poly, bgId) == 8) {
|
||||
play->roomCtx.unk_74[0] = 1;
|
||||
CollisionCheck_BlueBlood(play, NULL, pos);
|
||||
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
|
||||
@@ -2531,8 +2531,7 @@ void Actor_DisableLens(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
// Actor_InitContext
|
||||
void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry) {
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry) {
|
||||
SavedSceneFlags* savedSceneFlags;
|
||||
s32 i;
|
||||
|
||||
@@ -2548,12 +2547,12 @@ void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEnt
|
||||
actorCtx->flags.clear = savedSceneFlags->clear;
|
||||
actorCtx->flags.collect = savedSceneFlags->collect;
|
||||
|
||||
func_8002CDE4(play, &actorCtx->titleCtx);
|
||||
TitleCard_Init(play, &actorCtx->titleCtx);
|
||||
|
||||
actorCtx->absoluteSpace = NULL;
|
||||
|
||||
Actor_SpawnEntry(actorCtx, actorEntry, play);
|
||||
func_8002C0C0(&actorCtx->targetCtx, actorCtx->actorLists[ACTORCAT_PLAYER].head, play);
|
||||
Attention_Init(&actorCtx->targetCtx, actorCtx->actorLists[ACTORCAT_PLAYER].head, play);
|
||||
func_8002FA60(play);
|
||||
}
|
||||
|
||||
@@ -2721,7 +2720,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
func_8002C7BC(&actorCtx->targetCtx, player, actor, play);
|
||||
Attention_Update(&actorCtx->targetCtx, player, actor, play);
|
||||
TitleCard_Update(play, &actorCtx->titleCtx);
|
||||
DynaPoly_UpdateBgActorTransforms(play, &play->colCtx.dyna);
|
||||
}
|
||||
@@ -2817,7 +2816,7 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
||||
Fault_RemoveClient(&faultClient);
|
||||
}
|
||||
|
||||
void func_80030ED8(Actor* actor) {
|
||||
void Actor_UpdateFlaggedAudio(Actor* actor) {
|
||||
if (actor->flags & ACTOR_FLAG_SFX_ACTOR_POS_2) {
|
||||
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
@@ -2945,11 +2944,11 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
s32 func_800314B0(PlayState* play, Actor* actor) {
|
||||
return func_800314D4(play, actor, &actor->projectedPos, actor->projectedW);
|
||||
s32 Actor_CullingCheck(PlayState* play, Actor* actor) {
|
||||
return Actor_CullingVolumeTest(play, actor, &actor->projectedPos, actor->projectedW);
|
||||
}
|
||||
|
||||
s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
|
||||
s32 Actor_CullingVolumeTest(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
|
||||
f32 var;
|
||||
|
||||
if ((arg2->z > -actor->uncullZoneScale) && (arg2->z < (actor->uncullZoneForward + actor->uncullZoneScale))) {
|
||||
@@ -2972,7 +2971,7 @@ s32 Ship_CalcShouldDrawAndUpdate(PlayState* play, Actor* actor, Vec3f* projected
|
||||
f32 clampedProjectedW;
|
||||
|
||||
// Check if the actor passes its original/vanilla culling requirements
|
||||
if (func_800314D4(play, actor, projectedPos, projectedW)) {
|
||||
if (Actor_CullingVolumeTest(play, actor, projectedPos, projectedW)) {
|
||||
*shouldUpdate = true;
|
||||
*shouldDraw = true;
|
||||
return true;
|
||||
@@ -3039,7 +3038,7 @@ s32 Ship_CalcShouldDrawAndUpdate(PlayState* play, Actor* actor, Vec3f* projected
|
||||
}
|
||||
// #endregion
|
||||
|
||||
void func_800315AC(PlayState* play, ActorContext* actorCtx) {
|
||||
void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
s32 invisibleActorCounter;
|
||||
Actor* invisibleActors[INVISIBLE_ACTOR_MAX];
|
||||
ActorListEntry* actorListEntry;
|
||||
@@ -3070,7 +3069,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(69) == 0)) {
|
||||
if (actor->sfx != 0) {
|
||||
func_80030ED8(actor);
|
||||
Actor_UpdateFlaggedAudio(actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3089,7 +3088,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->flags &= ~ACTOR_FLAG_INSIDE_CULLING_VOLUME;
|
||||
}
|
||||
} else {
|
||||
if (func_800314B0(play, actor)) {
|
||||
if (Actor_CullingCheck(play, actor)) {
|
||||
actor->flags |= ACTOR_FLAG_INSIDE_CULLING_VOLUME;
|
||||
} else {
|
||||
actor->flags &= ~ACTOR_FLAG_INSIDE_CULLING_VOLUME;
|
||||
@@ -3157,7 +3156,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_80031A28(PlayState* play, ActorContext* actorCtx) {
|
||||
void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
|
||||
@@ -3534,7 +3533,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
|
||||
return newHead;
|
||||
}
|
||||
|
||||
s32 func_80032880(PlayState* play, Actor* actor) {
|
||||
s32 Attention_ActorOnScreen(PlayState* play, Actor* actor) {
|
||||
s16 sp1E;
|
||||
s16 sp1C;
|
||||
|
||||
@@ -3550,7 +3549,7 @@ f32 sbgmEnemyDistSq;
|
||||
s32 D_8015BBF8;
|
||||
s16 D_8015BBFC;
|
||||
|
||||
void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32 actorCategory) {
|
||||
void Attention_FindActorInCategory(PlayState* play, ActorContext* actorCtx, Player* player, u32 actorCategory) {
|
||||
f32 var;
|
||||
Actor* actor;
|
||||
Actor* sp84;
|
||||
@@ -3578,8 +3577,9 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32
|
||||
}
|
||||
|
||||
if (actor != sp84) {
|
||||
var = func_8002EFC0(actor, player, D_8015BBFC);
|
||||
if ((var < D_8015BBF0) && func_8002F090(actor, var) && func_80032880(play, actor) &&
|
||||
var = Attention_WeightedDistToPlayerSq(actor, player, D_8015BBFC);
|
||||
if ((var < D_8015BBF0) && Attention_ActorIsInRange(actor, var) &&
|
||||
Attention_ActorOnScreen(play, actor) &&
|
||||
(!BgCheck_CameraLineTest1(&play->colCtx, &player->actor.focus.pos, &actor->focus.pos, &sp70, &sp80,
|
||||
1, 1, 1, 1, &sp7C) ||
|
||||
SurfaceType_IsIgnoredByProjectiles(&play->colCtx, sp80, sp7C))) {
|
||||
@@ -3605,7 +3605,7 @@ u8 D_801160A0[] = {
|
||||
ACTORCAT_CHEST, ACTORCAT_SWITCH, ACTORCAT_PROP, ACTORCAT_MISC, ACTORCAT_DOOR, ACTORCAT_SWITCH,
|
||||
};
|
||||
|
||||
Actor* func_80032AF0(PlayState* play, ActorContext* actorCtx, Actor** actorPtr, Player* player) {
|
||||
Actor* Attention_FindActor(PlayState* play, ActorContext* actorCtx, Actor** actorPtr, Player* player) {
|
||||
s32 i;
|
||||
u8* entry;
|
||||
|
||||
@@ -3620,13 +3620,13 @@ Actor* func_80032AF0(PlayState* play, ActorContext* actorCtx, Actor** actorPtr,
|
||||
D_8015BBFC = player->actor.shape.rot.y;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
func_800328D4(play, actorCtx, player, *entry);
|
||||
Attention_FindActorInCategory(play, actorCtx, player, *entry);
|
||||
entry++;
|
||||
}
|
||||
|
||||
if (D_8015BBE8 == NULL) {
|
||||
for (; i < ARRAY_COUNT(D_801160A0); i++) {
|
||||
func_800328D4(play, actorCtx, player, *entry);
|
||||
Attention_FindActorInCategory(play, actorCtx, player, *entry);
|
||||
entry++;
|
||||
}
|
||||
}
|
||||
@@ -3666,7 +3666,7 @@ void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
}
|
||||
|
||||
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
s16 FaceChange_UpdateBlinking(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
}
|
||||
@@ -3682,7 +3682,7 @@ s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
return arg0[0];
|
||||
}
|
||||
|
||||
s16 func_80032D60(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
s16 FaceChange_UpdateRandomSet(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
arg0[0]++;
|
||||
@@ -4139,7 +4139,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_80033DB8(PlayState* play, s16 arg1, s16 arg2) {
|
||||
void Actor_RequestQuake(PlayState* play, s16 arg1, s16 arg2) {
|
||||
s16 var = Quake_Add(&play->mainCamera, 3);
|
||||
|
||||
Quake_SetSpeed(var, 20000);
|
||||
@@ -4147,7 +4147,7 @@ void func_80033DB8(PlayState* play, s16 arg1, s16 arg2) {
|
||||
Quake_SetCountdown(var, arg2);
|
||||
}
|
||||
|
||||
void func_80033E1C(PlayState* play, s16 arg1, s16 arg2, s16 arg3) {
|
||||
void Actor_RequestQuakeWithSpeed(PlayState* play, s16 arg1, s16 arg2, s16 arg3) {
|
||||
s16 var = Quake_Add(&play->mainCamera, 3);
|
||||
|
||||
Quake_SetSpeed(var, arg3);
|
||||
@@ -4155,14 +4155,14 @@ void func_80033E1C(PlayState* play, s16 arg1, s16 arg2, s16 arg3) {
|
||||
Quake_SetCountdown(var, arg2);
|
||||
}
|
||||
|
||||
void func_80033E88(Actor* actor, PlayState* play, s16 arg2, s16 arg3) {
|
||||
void Actor_RequestQuakeAndRumble(Actor* actor, PlayState* play, s16 arg2, s16 arg3) {
|
||||
if (arg2 >= 5) {
|
||||
func_800AA000(actor->xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
|
||||
Rumble_Request(actor->xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
|
||||
} else {
|
||||
func_800AA000(actor->xyzDistToPlayerSq, 0xB4, 0x14, 0x64);
|
||||
Rumble_Request(actor->xyzDistToPlayerSq, 0xB4, 0x14, 0x64);
|
||||
}
|
||||
|
||||
func_80033DB8(play, arg2, arg3);
|
||||
Actor_RequestQuake(play, arg2, arg3);
|
||||
}
|
||||
|
||||
f32 Rand_ZeroFloat(f32 f) {
|
||||
@@ -4316,7 +4316,7 @@ s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interac
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!func_8002F2CC(actor, play, interactRange)) {
|
||||
if (!Actor_OfferTalk(actor, play, interactRange)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4646,7 +4646,7 @@ void Animation_ChangeByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo,
|
||||
frameCount, animationInfo->mode, animationInfo->morphFrames);
|
||||
}
|
||||
|
||||
void func_80034F54(PlayState* play, s16* arg1, s16* arg2, s32 arg3) {
|
||||
void Actor_UpdateFidgetTables(PlayState* play, s16* arg1, s16* arg2, s32 arg3) {
|
||||
u32 frames = play->gameplayFrames;
|
||||
s32 i;
|
||||
|
||||
@@ -6383,11 +6383,11 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
|
||||
}
|
||||
|
||||
if (actor->xyzDistToPlayerSq <= SQ(80.0f)) {
|
||||
if (func_8002F2CC(actor, play, 80.0f)) {
|
||||
if (Actor_OfferTalk(actor, play, 80.0f)) {
|
||||
actor->textId = func_80037C30(play, arg2);
|
||||
}
|
||||
} else {
|
||||
if (func_8002F2F4(actor, play)) {
|
||||
if (Actor_OfferTalkNearColChkInfoCylinder(actor, play)) {
|
||||
actor->textId = func_80037C30(play, arg2);
|
||||
}
|
||||
}
|
||||
@@ -6395,7 +6395,7 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_80037F30(Vec3s* arg0, Vec3s* arg1) {
|
||||
s32 Actor_TrackNone(Vec3s* arg0, Vec3s* arg1) {
|
||||
Math_SmoothStepToS(&arg0->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg0->x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg1->y, 0, 6, 6200, 100);
|
||||
@@ -6403,7 +6403,7 @@ s32 func_80037F30(Vec3s* arg0, Vec3s* arg1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80037FC8(Actor* actor, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3) {
|
||||
s32 Actor_TrackPoint(Actor* actor, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3) {
|
||||
s16 sp36;
|
||||
s16 sp34;
|
||||
s16 var;
|
||||
@@ -6427,7 +6427,7 @@ s32 func_80037FC8(Actor* actor, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 arg4) {
|
||||
s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 arg4) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
Vec3f sp2C;
|
||||
@@ -6442,7 +6442,7 @@ s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 a
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
func_80037F30(arg2, arg3);
|
||||
Actor_TrackNone(arg2, arg3);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -6454,12 +6454,12 @@ s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 a
|
||||
sp2C = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_80037FC8(actor, &sp2C, arg2, arg3);
|
||||
Actor_TrackPoint(actor, &sp2C, arg2, arg3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4) {
|
||||
s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
Vec3f sp24;
|
||||
@@ -6473,7 +6473,7 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
func_80037F30(arg2, arg3);
|
||||
Actor_TrackNone(arg2, arg3);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -6485,7 +6485,7 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f
|
||||
sp24 = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_80037FC8(actor, &sp24, arg2, arg3);
|
||||
Actor_TrackPoint(actor, &sp24, arg2, arg3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user