Option for Team faces in cutscenes

This commit is contained in:
Sonic Dreamcaster 2024-11-24 21:12:39 -03:00
parent 29fb86f92d
commit d2a4a4d553
9 changed files with 74 additions and 47 deletions

View File

@ -100,8 +100,10 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) {
} else { } else {
this->iwork[11] = 1; this->iwork[11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = index + 2; // @port: Setup team faces
this->iwork[14] = index + 2;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
} }

View File

@ -1917,8 +1917,10 @@ void Meteo_LevelStart_SetupTeam(ActorCutscene* this, s32 teamIdx) {
this->iwork[11] = 1; this->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = teamIdx + 2; // @port: Setup team faces
this->iwork[14] = teamIdx + 2;
}
return; return;
} }
@ -2402,8 +2404,10 @@ void Meteo_LevelComplete_SetupTeam(ActorCutscene* this, s32 teamIdx) {
this->iwork[11] = 1; this->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = teamIdx + 2; // @port: Setup team faces
this->iwork[14] = teamIdx + 2;
}
} }
} }

View File

@ -2229,8 +2229,10 @@ void Area6_8018D804(ActorCutscene* this, s32 teamIdx) {
this->fwork[0] = 0.0f; this->fwork[0] = 0.0f;
Object_SetInfo(&this->info, this->obj.id); Object_SetInfo(&this->info, this->obj.id);
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = teamIdx + 2; // @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_ENGINE_FG, this->sfxSource, 4);
} }
@ -2663,9 +2665,9 @@ void Area6_8018EC38(ActorCutscene* this, s32 teamIdx) {
this->fwork[0] = 0.0f; this->fwork[0] = 0.0f;
// @port: Setup team faces (original code was omitting Peppy) // @port: Setup team faces (original code was omitting Peppy)
// if (teamIdx + 1 != 3) { if ((teamIdx + 1 != 3) || (CVarGetInteger("gTeamFaces", 1) == 1)) {
this->iwork[14] = teamIdx + 2; this->iwork[14] = teamIdx + 2;
// } }
Object_SetInfo(&this->info, this->obj.id); Object_SetInfo(&this->info, this->obj.id);
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);

View File

@ -3130,8 +3130,10 @@ void Solar_801A7750(void) {
Object_SetInfo(&actor->info, actor->obj.id); Object_SetInfo(&actor->info, actor->obj.id);
actor->iwork[11] = 1; actor->iwork[11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
actor->iwork[14] = i + 2; // @port: Setup team faces
actor->iwork[14] = i + 2;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
} }

View File

@ -1054,8 +1054,10 @@ void Bolse_8018EAEC(ActorCutscene* this, s32 index) {
Object_SetInfo(&this->info, this->obj.id); Object_SetInfo(&this->info, this->obj.id);
this->iwork[11] = 1; this->iwork[11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = index + 2; // @port: Setup team faces
this->iwork[14] = index + 2;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
} }
@ -1371,9 +1373,11 @@ void Bolse_8018F83C(Actor* this, s32 index) {
this->vel.z = -gPlayer[0].baseSpeed; this->vel.z = -gPlayer[0].baseSpeed;
Object_SetInfo(&this->info, this->obj.id); Object_SetInfo(&this->info, this->obj.id);
this->iwork[11] = 1; this->iwork[11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = index + 2; // @port: Setup team faces
this->iwork[14] = index + 2;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
} }
@ -2307,6 +2311,6 @@ void Bolse_DrawDynamicGround(void) {
} }
Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix);
// @port Pop the transform id. // @port Pop the transform id.
FrameInterpolation_RecordCloseChild(); FrameInterpolation_RecordCloseChild();
} }

View File

@ -634,9 +634,10 @@ void Fortuna_LevelComplete_CsSpawnTeam(ActorCutscene* this, s32 actorIdx) {
if (actorIdx < 3) { if (actorIdx < 3) {
this->iwork[11] = 1; this->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces // @port: Setup team faces
this->iwork[14] = actorIdx + 2; this->iwork[14] = actorIdx + 2;
}
} else { } else {
this->obj.pos.z = -9500.0f; this->obj.pos.z = -9500.0f;
this->animFrame = ACTOR_CS_GREAT_FOX; this->animFrame = ACTOR_CS_GREAT_FOX;

View File

@ -1715,8 +1715,10 @@ void Katina_SFTeamMissionAccomUpdate(ActorCutscene* this, s32 idx) {
this->iwork[KA_ACTOR_IWORK_11] = 1; this->iwork[KA_ACTOR_IWORK_11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = idx + 1; // @port: Setup team faces
this->iwork[14] = idx + 1;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
} }
@ -1744,8 +1746,10 @@ void Katina_SFTeamFleeUpdate(ActorCutscene* this, s32 idx) {
this->iwork[KA_ACTOR_IWORK_11] = 1; this->iwork[KA_ACTOR_IWORK_11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = idx + 1; // @port: Setup team faces
this->iwork[14] = idx + 1;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
} }
@ -1790,9 +1794,11 @@ void Katina_SFTeam_LevelComplete_Update(void) {
actor->animFrame = ACTOR_CS_CORNERIAN_FIGHTER; actor->animFrame = ACTOR_CS_CORNERIAN_FIGHTER;
} }
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
if ((i >= 0) && (i <= 2)) { // @port: Setup team faces
actor->iwork[14] = i + 2; if ((i >= 0) && (i <= 2)) {
actor->iwork[14] = i + 2;
}
} }
Object_SetInfo(&actor->info, actor->obj.id); Object_SetInfo(&actor->info, actor->obj.id);
@ -2633,7 +2639,7 @@ void Katina_EnemyDraw(ActorAllRange* this) {
} }
// @port: never use low poly // @port: never use low poly
if (CVarGetInteger("gDisableLOD", 0) == 1) { if (CVarGetInteger("gDisableLOD", 1) == 1) {
this->iwork[KA_ACTOR_LOW_POLY] = false; this->iwork[KA_ACTOR_LOW_POLY] = false;
} }

View File

@ -780,17 +780,19 @@ void SectorZ_CsTeamInit(ActorCutscene* this, s32 index) {
Object_SetInfo(&this->info, this->obj.id); Object_SetInfo(&this->info, this->obj.id);
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
switch (index) { // @port: Setup team faces
case 0: // Slippy switch (index) {
this->iwork[14] = index + 3; case 0: // Slippy
break; this->iwork[14] = index + 3;
case 1: // Falco break;
this->iwork[14] = index + 1; case 1: // Falco
break; this->iwork[14] = index + 1;
case 2: // Peppy break;
this->iwork[14] = index + 2; case 2: // Peppy
break; this->iwork[14] = index + 2;
break;
}
} }
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);

View File

@ -2069,9 +2069,11 @@ void SectorY_8019EB80(void) {
} }
actor->iwork[11] = 1; actor->iwork[11] = 1;
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
if ((i >= 0) && (i <= 2)) { // @port: Setup team faces
actor->iwork[14] = i + 2; if ((i >= 0) && (i <= 2)) {
actor->iwork[14] = i + 2;
}
} }
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -2601,9 +2603,11 @@ void SectorY_801A06A4(ActorCutscene* this, s32 teamIdx) {
this->state = teamIdx + 7; this->state = teamIdx + 7;
this->iwork[11] = 1; this->iwork[11] = 1;
Object_SetInfo(&this->info, this->obj.id); Object_SetInfo(&this->info, this->obj.id);
// @port: Setup team faces if (CVarGetInteger("gTeamFaces", 1) == 1) {
this->iwork[14] = teamIdx + 2; // @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_ENGINE_FG, this->sfxSource, 4);
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0);