From f17c7bdc2717f43ddef04c1a297492e6405068d4 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 04:28:42 -0300 Subject: [PATCH] teamFaceId -> drawFace --- include/sf64player.h | 2 +- src/engine/fox_360.c | 4 ++-- src/engine/fox_demo.c | 6 +++--- src/engine/fox_display.c | 20 ++++++++++---------- src/engine/fox_edisplay.c | 2 +- src/engine/fox_play.c | 6 +++--- src/overlays/ovl_ending/fox_end2.c | 4 ++-- src/overlays/ovl_i2/fox_me.c | 4 ++-- src/overlays/ovl_i2/fox_sx.c | 2 +- src/overlays/ovl_i3/fox_a6.c | 2 +- src/overlays/ovl_i3/fox_so.c | 2 +- src/overlays/ovl_i3/fox_zo.c | 2 +- src/overlays/ovl_i4/fox_bo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 4 ++-- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_i6/fox_sy.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 2ab36ea9..0ac36061 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -140,7 +140,7 @@ typedef struct ArwingInfo { /* 0x20 */ f32 wingsYrot; /* 0x24 */ f32 wingsZrot; /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 teamFaceId; + /* 0x2C */ u8 drawFace; /* 0x30 */ f32 teamFaceXrot; /* 0x34 */ f32 teamFaceYrot; /* 0x38 */ f32 windshieldXrot; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 26a352da..9a42f37d 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -170,7 +170,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.z = 0.0f; gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->csState++; break; @@ -230,7 +230,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->rot.x += 0.4f; if (gCsFrameCount >= 130) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->arwing.teamFaceId = 0; + player->arwing.drawFace = false; player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index e4dd528d..da745f1a 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -130,7 +130,7 @@ void Cutscene_WarpZoneComplete(Player* player) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; gCsFrameCount = 0; /* fallthrough */ case 1: @@ -796,7 +796,7 @@ void Cutscene_AllRangeMode(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 60.0f; D_ctx_80177A48[3] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->csState++; gCsFrameCount = 0; /* fallthrough */ @@ -925,7 +925,7 @@ void Cutscene_CoComplete2(Player* player) { player->zRotBarrelRoll = 0.0f; player->zRotBank = 0.0f; player->boostSpeed = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->baseSpeed = 40.0f; /* fallthrough */ diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index dabc2a6a..38ead565 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -559,8 +559,8 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos } void Display_ArwingWings(ArwingInfo* arwing) { - Vec3f sp68[30]; - s32 teamFaceId; + Vec3f frameTable[30]; + s32 drawFace; Matrix_Push(&gGfxMatrix); @@ -574,22 +574,22 @@ void Display_ArwingWings(ArwingInfo* arwing) { arwing, &gIdentityMatrix); } else { if (gGameState == GSTATE_MENU) { - Animation_GetFrameData(&D_arwing_3015AF4, 0, sp68); + Animation_GetFrameData(&D_arwing_3015AF4, 0, frameTable); } else { - Animation_GetFrameData(&D_arwing_3015C28, 0, sp68); + Animation_GetFrameData(&D_arwing_3015C28, 0, frameTable); } - Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, arwing, + Animation_DrawSkeleton(1, D_arwing_3016610, frameTable, Display_ArwingWingsOverrideLimbDraw, NULL, arwing, &gIdentityMatrix); } D_display_800CA22C = false; - teamFaceId = arwing->teamFaceId; + drawFace = arwing->drawFace; if (D_display_800CA220 != 0) { - teamFaceId = 1; + drawFace = true; } - if (teamFaceId != 0) { + if (drawFace != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, arwing->teamFaceYrot * M_DTOR, MTXF_APPLY); @@ -600,9 +600,9 @@ void Display_ArwingWings(ArwingInfo* arwing) { } Matrix_SetGfxMtx(&gMasterDisp); if (gExpertMode) { - gSPDisplayList(gMasterDisp++, D_display_800CA27C[teamFaceId - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA27C[drawFace - 1]); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA26C[teamFaceId - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA26C[drawFace - 1]); } Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 7a0676c7..ffe67524 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -539,7 +539,7 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.laserGunsYpos = D_edisplay_80161630.laserGunsXpos = D_edisplay_80161630.wingsXrot = D_edisplay_80161630.wingsYrot = D_edisplay_80161630.windshieldXrot = D_edisplay_80161630.wingsZrot = 0.0f; D_edisplay_80161630.unk_28 = actor->fwork[17]; - D_edisplay_80161630.teamFaceId = actor->iwork[14]; + D_edisplay_80161630.drawFace = actor->iwork[14]; D_edisplay_80161630.teamFaceXrot = actor->fwork[20]; D_edisplay_80161630.teamFaceYrot = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 5c823d7d..c20df7e1 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -5784,14 +5784,14 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_LEVEL_INTRO: gShowHud = 0; gPauseEnabled = false; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Cutscene_LevelStart(player); break; case PLAYERSTATE_1C8_ACTIVE: gShowHud = 1; Player_LowHealthMsg(player); - player->arwing.teamFaceId = 0; + player->arwing.drawFace = false; D_hud_80161704 = 255; if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) && @@ -5862,7 +5862,7 @@ void Player_Update(Player* player) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index a43c0aad..dd652136 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -856,9 +856,9 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.laserGunsXpos = D_ending_80198590.wingsXrot; if ((arg0 > 520) && (arg0 < 720)) { - D_ending_80198590.teamFaceId = 1; + D_ending_80198590.drawFace = true; } else { - D_ending_80198590.teamFaceId = 0; + D_ending_80198590.drawFace = false; } D_ending_80198590.windshieldXrot = 0.0f; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index b52d06fc..7807287e 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2020,7 +2020,7 @@ void Meteo_LevelStart(Player* player) { } if (gCsFrameCount > 660) { - player->arwing.teamFaceId = 0; + player->arwing.drawFace = false; } if (gCsFrameCount == 340) { @@ -2238,7 +2238,7 @@ void Meteo_LevelComplete(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; gCsFrameCount = 0; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 9f07fd38..d996891a 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1741,7 +1741,7 @@ void SectorX_LevelComplete(Player* player) { D_ctx_80177A48[2] = 100.0f; D_ctx_80177A48[4] = 100.0f; D_ctx_80177A48[5] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Play_ClearObjectData(); case 1: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 4891bb23..3307d341 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2653,7 +2653,7 @@ void Area6_LevelComplete(Player* player) { case 0: gCsFrameCount = 0; player->csState = 1; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->unk_194 = 5.0f; player->unk_190 = 2.0f; player->baseSpeed = 60.0f; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index cb7fe63c..e6be1f26 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3244,7 +3244,7 @@ void Solar_LevelComplete(Player* player) { player->pos.y = 200.0f; player->pos.z = -(gPathProgress - 500.0f); player->csState++; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Audio_StartPlayerNoise(0); diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index dafaab5b..ac5d4133 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4825,7 +4825,7 @@ void Zoness_LevelComplete(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->csTimer = 20; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->baseSpeed = 0.0f; player->rot.x = 0.0f; player->rot.y = 0.0f; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 523206f2..8bec81f5 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1461,7 +1461,7 @@ void Bolse_LevelComplete(Player* player) { gCsFrameCount = 0; gGroundHeight = -10000.0f; player->hideShadow = true; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); } diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index f29d7441..ddea95a6 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -682,7 +682,7 @@ void Fortuna_LevelComplete(Player* player) { switch (player->csState) { case -1: - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->rot.y = 0.0f; player->baseSpeed = 30.0f; player->yRot_114 = 180.0f; @@ -841,7 +841,7 @@ void Fortuna_LevelComplete(Player* player) { } player->pos.z = -10000.0f; gCsFrameCount = 0; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->wingPosition = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 6706dfc3..bae0875b 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3863,7 +3863,7 @@ void Andross_80193C4C(Player* player) { switch (player->csState) { case 0: gCsFrameCount = 0; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; D_ctx_80177A48[0] = 0.0f; if (player->aerobaticPitch > 180.0f) { player->aerobaticPitch -= 360.0f; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index ee7133d6..6534def2 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2193,7 +2193,7 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[7] = 25.0f; D_ctx_80177A48[8] = 500.0f; D_ctx_80177A48[9] = 3600.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; } break; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 4bdc2eb5..1ec85a07 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -315,7 +315,7 @@ void Venom2_LevelComplete(Player* player) { player->csState++; player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.bottomLeftFlapYrot = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 1561816e..76e07b7f 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2276,7 +2276,7 @@ void Map_801A116C(void) { // clang-format on arwing.laserGunsYpos = 0.0f; - arwing.teamFaceId = 1; + arwing.drawFace = true; arwing.teamFaceXrot = 0.0f; arwing.teamFaceYrot = 0.0f; arwing.windshieldXrot = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index a1709772..6dc2e693 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2258,7 +2258,7 @@ void Title_8018D2B8(s32 arg0) { arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.bottomLeftFlapYrot = arwing.unk_28 = 0.0f; arwing.laserGunsYpos = D_menu_801B84E8[arg0].unk_28; - arwing.teamFaceId = D_menu_801B84E8[arg0].unk_34; + arwing.drawFace = D_menu_801B84E8[arg0].unk_34; arwing.teamFaceXrot = D_menu_801B84E8[arg0].unk_2C; arwing.teamFaceYrot = D_menu_801B84E8[arg0].unk_30; arwing.windshieldXrot = D_menu_801B84E8[arg0].unk_24;