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 {
this->iwork[11] = 1;
// @port: Setup team faces
this->iwork[14] = index + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = index + 2;
}
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;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
// @port: Setup team faces
this->iwork[14] = teamIdx + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = teamIdx + 2;
}
return;
}
@ -2402,8 +2404,10 @@ void Meteo_LevelComplete_SetupTeam(ActorCutscene* this, s32 teamIdx) {
this->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
// @port: Setup team faces
this->iwork[14] = teamIdx + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @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;
Object_SetInfo(&this->info, this->obj.id);
// @port: Setup team faces
this->iwork[14] = teamIdx + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = teamIdx + 2;
}
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;
// @port: Setup team faces (original code was omitting Peppy)
// if (teamIdx + 1 != 3) {
this->iwork[14] = teamIdx + 2;
// }
if ((teamIdx + 1 != 3) || (CVarGetInteger("gTeamFaces", 1) == 1)) {
this->iwork[14] = teamIdx + 2;
}
Object_SetInfo(&this->info, this->obj.id);
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);
actor->iwork[11] = 1;
// @port: Setup team faces
actor->iwork[14] = i + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
actor->iwork[14] = i + 2;
}
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);
this->iwork[11] = 1;
// @port: Setup team faces
this->iwork[14] = index + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = index + 2;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
}
@ -1372,8 +1374,10 @@ void Bolse_8018F83C(Actor* this, s32 index) {
Object_SetInfo(&this->info, this->obj.id);
this->iwork[11] = 1;
// @port: Setup team faces
this->iwork[14] = index + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = index + 2;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
}
@ -2307,6 +2311,6 @@ void Bolse_DrawDynamicGround(void) {
}
Matrix_Pop(&gGfxMatrix);
// @port Pop the transform id.
// @port Pop the transform id.
FrameInterpolation_RecordCloseChild();
}

View File

@ -634,9 +634,10 @@ 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;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = actorIdx + 2;
}
} else {
this->obj.pos.z = -9500.0f;
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;
// @port: Setup team faces
this->iwork[14] = idx + 1;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = idx + 1;
}
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;
// @port: Setup team faces
this->iwork[14] = idx + 1;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
this->iwork[14] = idx + 1;
}
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;
}
// @port: Setup team faces
if ((i >= 0) && (i <= 2)) {
actor->iwork[14] = i + 2;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @port: Setup team faces
if ((i >= 0) && (i <= 2)) {
actor->iwork[14] = i + 2;
}
}
Object_SetInfo(&actor->info, actor->obj.id);
@ -2633,7 +2639,7 @@ void Katina_EnemyDraw(ActorAllRange* this) {
}
// @port: never use low poly
if (CVarGetInteger("gDisableLOD", 0) == 1) {
if (CVarGetInteger("gDisableLOD", 1) == 1) {
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);
// @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;
if (CVarGetInteger("gTeamFaces", 1) == 1) {
// @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);

View File

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