From 846630e2cbc512124ca548d997f1f6fe11ca7390 Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Tue, 19 Nov 2024 15:38:48 -0300 Subject: [PATCH] add team faces inside arwings --- src/engine/fox_demo.c | 7 +++++++ src/overlays/ovl_i1/fox_co.c | 2 ++ src/overlays/ovl_i2/fox_me.c | 6 ++++++ src/overlays/ovl_i3/fox_a6.c | 11 ++++++++--- src/overlays/ovl_i3/fox_so.c | 4 ++++ src/overlays/ovl_i4/fox_bo.c | 8 ++++++++ src/overlays/ovl_i4/fox_fo.c | 3 +++ src/overlays/ovl_i4/fox_ka.c | 11 +++++++++++ src/overlays/ovl_i4/fox_sz.c | 16 ++++++++++++++++ src/overlays/ovl_i6/fox_sy.c | 10 ++++++++++ 10 files changed, 75 insertions(+), 3 deletions(-) diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 1b8e6f33..356335a3 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -99,6 +99,10 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) { this->animFrame = ACTOR_CS_GREAT_FOX; } else { this->iwork[11] = 1; + + // @port: Setup team faces + this->iwork[14] = index + 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } @@ -686,6 +690,9 @@ void func_demo_8004A700(ActorCutscene* this, s32 index) { this->obj.rot.z = D_demo_800CA074[index]; this->iwork[11] = 1; Object_SetInfo(&this->info, this->obj.id); + + // @port set team faces + this->iwork[14] = index + 2; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 5c31cd3f..e586a123 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -3428,6 +3428,8 @@ void Corneria_CsLevelComplete1_TeamSetup(ActorCutscene* this, s32 index) { Object_SetInfo(&this->info, this->obj.id); this->iwork[11] = 1; + // @port set team faces + this->iwork[14] = index + 2; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 96630ec8..ddf473c0 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -1916,6 +1916,9 @@ void Meteo_LevelStart_SetupTeam(ActorCutscene* this, s32 teamIdx) { if (this->animFrame == 0) { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + + // @port: Setup team faces + this->iwork[14] = teamIdx + 2; return; } @@ -2398,6 +2401,9 @@ void Meteo_LevelComplete_SetupTeam(ActorCutscene* this, s32 teamIdx) { } else { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + + // @port: Setup team faces + this->iwork[14] = teamIdx + 2; } } diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 8b1230f9..ca2b8708 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2202,6 +2202,10 @@ void Area6_8018D804(ActorCutscene* this, s32 arg1) { this->iwork[11] = 1; this->fwork[0] = 0.0f; Object_SetInfo(&this->info, this->obj.id); + + // @port: Setup team faces + this->iwork[14] = teamIdx + 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } @@ -2632,9 +2636,10 @@ void Area6_8018EC38(ActorCutscene* this, s32 arg1) { this->iwork[11] = 1; this->fwork[0] = 0.0f; - if (arg1 + 1 != 3) { - this->iwork[14] = arg1 + 2; - } + // @port: Setup team faces (original code was omitting Peppy) + // if (teamIdx + 1 != 3) { + this->iwork[14] = teamIdx + 2; + // } Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 06f4ed24..755538b7 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3129,6 +3129,10 @@ void Solar_801A7750(void) { actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; + + // @port: Setup team faces + actor->iwork[14] = i + 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 40f860d3..e1a43c52 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1053,6 +1053,10 @@ void Bolse_8018EAEC(ActorCutscene* this, s32 index) { this->rot_0F4.y = D_i4_8019F018[index]; Object_SetInfo(&this->info, this->obj.id); this->iwork[11] = 1; + + // @port: Setup team faces + this->iwork[14] = index + 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } @@ -1367,6 +1371,10 @@ void Bolse_8018F83C(Actor* this, s32 index) { this->vel.z = -gPlayer[0].baseSpeed; Object_SetInfo(&this->info, this->obj.id); this->iwork[11] = 1; + + // @port: Setup team faces + this->iwork[14] = index + 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index d93c1df4..634cc4db 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -634,6 +634,9 @@ void Fortuna_LevelComplete_CsSpawnTeam(ActorCutscene* this, s32 actorIdx) { if (actorIdx < 3) { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + + // @port: Setup team faces + this->iwork[14] = actorIdx + 2; } else { this->obj.pos.z = -9500.0f; this->animFrame = ACTOR_CS_GREAT_FOX; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index b1c1e264..a8d43bd5 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1715,6 +1715,9 @@ void Katina_SFTeamMissionAccomUpdate(ActorCutscene* this, s32 idx) { this->iwork[KA_ACTOR_IWORK_11] = 1; + // @port: Setup team faces + this->iwork[14] = idx + 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } @@ -1741,6 +1744,9 @@ void Katina_SFTeamFleeUpdate(ActorCutscene* this, s32 idx) { this->iwork[KA_ACTOR_IWORK_11] = 1; + // @port: Setup team faces + this->iwork[14] = idx + 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } @@ -1784,6 +1790,11 @@ void Katina_SFTeam_LevelComplete_Update(void) { actor->animFrame = ACTOR_CS_CORNERIAN_FIGHTER; } + // @port: Setup team faces + if ((i >= 0) && (i <= 2)) { + actor->iwork[14] = i + 2; + } + Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[KA_ACTOR_IWORK_11] = 1; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index dbadf9d5..6992e422 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -773,6 +773,19 @@ void SectorZ_CsTeamInit(ActorCutscene* this, s32 index) { Object_SetInfo(&this->info, this->obj.id); + // @port: Setup team faces + switch (index) { + case 0: // Slippy + this->iwork[14] = index + 3; + break; + case 1: // Falco + this->iwork[14] = index + 1; + break; + case 2: // Peppy + this->iwork[14] = index + 2; + break; + } + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); @@ -1096,6 +1109,9 @@ void SectorZ_CsLevelCompleteTeamInit(ActorCutscene* this, s32 index) { if (index < 3) { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + + // @port set team faces + this->iwork[14] = index + 2; } else { this->animFrame = ACTOR_CS_GREAT_FOX; this->fwork[0] = 20.0f; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 28fc961e..7889bfae 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2068,6 +2068,12 @@ void SectorY_8019EB80(void) { actor->scale = 0.125f; } actor->iwork[11] = 1; + + // @port: Setup team faces + if ((i >= 0) && (i <= 2)) { + actor->iwork[14] = i + 2; + } + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -2595,6 +2601,10 @@ void SectorY_801A06A4(ActorCutscene* this, s32 arg1) { this->state = arg1 + 7; this->iwork[11] = 1; Object_SetInfo(&this->info, this->obj.id); + + // @port: Setup team faces + this->iwork[14] = teamIdx + 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); }