From bef7345bf77c3a9f6868d260c7e120b1747b8c4e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 02:56:41 -0300 Subject: [PATCH] leftState -> leftWingState --- include/sf64player.h | 2 +- src/engine/fox_360.c | 2 +- src/engine/fox_demo.c | 8 ++++---- src/engine/fox_display.c | 14 +++++++------- src/engine/fox_edisplay.c | 6 +++--- src/engine/fox_enmy.c | 8 ++++---- src/engine/fox_enmy2.c | 2 +- src/engine/fox_play.c | 24 ++++++++++++------------ src/mods/object_ram.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i6/fox_andross.c | 4 ++-- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 3c75f49a..e6749a77 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -129,7 +129,7 @@ typedef struct PlayerShot { typedef struct ArwingInfo { // ArArwingInfo /* 0x00 */ u8 rightWingState; // rightWingState - /* 0x01 */ u8 leftState; // leftWingState + /* 0x01 */ u8 leftWingState; // leftWingState /* 0x04 */ f32 unk_04; // upperRightFlapYrot /* 0x08 */ f32 unk_08; // bottomRightFlapYrot /* 0x0C */ f32 unk_0C; // upperLeftFlapYrot diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 99769bbd..a829bdd5 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -200,7 +200,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->shields = Play_GetMaxShields(); player->arwing.rightWingState = WINGSTATE_INTACT; - player->arwing.leftState = WINGSTATE_INTACT; + player->arwing.leftWingState = WINGSTATE_INTACT; if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 82fc373b..875d7073 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -1694,9 +1694,9 @@ void Cutscene_ArwingDown360(Player* player) { player->arwing.rightWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->arwing.leftState = WINGSTATE_BROKEN; + player->arwing.leftWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || @@ -1802,9 +1802,9 @@ void Cutscene_ArwingDownOnRails(Player* player) { func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->arwing.leftState = WINGSTATE_NONE; + player->arwing.leftWingState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || (player->csEventTimer == 0)) && diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index d717b922..3671b0d0 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -493,10 +493,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos break; case 12: - if (arwing->rightWingState == WINGSTATE_NONE) { // should be leftState? + if (arwing->rightWingState == WINGSTATE_NONE) { // should be leftWingState? *gfxPtr = NULL; } - if (arwing->leftState == WINGSTATE_BROKEN) { + if (arwing->leftWingState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3014BF0; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { @@ -512,7 +512,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos case 5: case 6: - if (arwing->leftState != 2) { + if (arwing->leftWingState != 2) { *gfxPtr = NULL; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { @@ -679,13 +679,13 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if (gVersusMode) { - if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_300EE80); } else if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && - (player->arwing.leftState == WINGSTATE_INTACT)) { + (player->arwing.leftWingState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_3010A90); } else if ((player->arwing.rightWingState == WINGSTATE_INTACT) && - (player->arwing.leftState <= WINGSTATE_BROKEN)) { + (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { gSPDisplayList(gMasterDisp++, D_versus_3011470); } else { gSPDisplayList(gMasterDisp++, D_versus_300D550); @@ -1232,7 +1232,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index b85685df..84756c19 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -525,12 +525,12 @@ void func_edisplay_8005B388(Actor199* actor) { ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (actor->state == 5))) { D_edisplay_80161630.rightWingState = gPlayer[0].arwing.rightWingState; - D_edisplay_80161630.leftState = gPlayer[0].arwing.leftState; + D_edisplay_80161630.leftWingState = gPlayer[0].arwing.leftWingState; } else { - D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; + D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } } else { - D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; + D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } D_edisplay_80161630.unk_04 = actor->fwork[15]; D_edisplay_80161630.unk_0C = actor->fwork[16]; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index c1c34ef6..9a0dc215 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2108,7 +2108,7 @@ void ActorSupplies_Update(ActorSupplies* this) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); if (((player[0].arwing.rightWingState <= WINGSTATE_BROKEN) || - (player[0].arwing.leftState <= WINGSTATE_BROKEN)) && + (player[0].arwing.leftWingState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { this->itemDrop = DROP_WING_REPAIR; } else if (gPlayer[0].shields < 128) { @@ -2165,9 +2165,9 @@ void func_enmy_80067A40(void) { gRightWingFlashTimer[0] = 1050; gPlayer[0].arwing.rightWingState = WINGSTATE_INTACT; } - if (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) { + if (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN) { gLeftWingFlashTimer[0] = 1050; - gPlayer[0].arwing.leftState = WINGSTATE_INTACT; + gPlayer[0].arwing.leftWingState = WINGSTATE_INTACT; } if (gExpertMode) { @@ -2261,7 +2261,7 @@ void ItemPickup_Update(Item* this) { void ItemLasers_Update(ItemLasers* this) { if (!gVersusMode && - ((gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { + ((gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { this->obj.id = OBJ_ITEM_WING_REPAIR; Object_SetInfo(&this->info, this->obj.id); this->timer_48 = 2000; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 4e27e646..6ea5aac8 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2689,7 +2689,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { case EVC_WING_BROKEN: if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || - (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { + (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN)) { ActorEvent_TriggerBranch(this); } break; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index d69cd22e..b59617ad 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -169,7 +169,7 @@ void Player_WingEffects(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; } else { player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; @@ -194,7 +194,7 @@ void Player_DamageEffects(Player* player) { RAND_FLOAT(0.02f) + 0.02f, player->num + 1); } } - if (player->arwing.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftWingState <= WINGSTATE_BROKEN) { if (((gGameFrameCount % 2U) == 0) && (gLeftWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, player->hit2.z, 1.0f); @@ -838,11 +838,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { } } else if (side == 2) { gLeftWingFlashTimer[player->num] = 30; - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { gLeftWingHealth[player->num] -= damage; if (gLeftWingHealth[player->num] <= 0) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->arwing.leftState = WINGSTATE_BROKEN; + player->arwing.leftWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); gLeftWingDebrisTimer[player->num] = 50; Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); @@ -1621,7 +1621,7 @@ void Player_UpdateHitbox(Player* player) { Matrix_RotateZ(gCalcMatrix, -(player->bankAngle * M_DTOR), MTXF_APPLY); sp3C.y = 0.0f; sp3C.z = 0.0f; - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { sp3C.x = 40.0f; } else { sp3C.y = -10.0f; @@ -3293,7 +3293,7 @@ bool Player_UpdateLockOn(Player* player) { void Player_Shoot(Player* player) { switch (player->form) { case FORM_ARWING: - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } @@ -3349,9 +3349,9 @@ void Player_ArwingBank(Player* player) { f32 sp38; sp3C = 0.0f; - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { sp3C = -17.0f; - } else if ((player->arwing.leftState <= WINGSTATE_BROKEN) && (player->arwing.rightWingState == WINGSTATE_INTACT)) { + } else if ((player->arwing.leftWingState <= WINGSTATE_BROKEN) && (player->arwing.rightWingState == WINGSTATE_INTACT)) { sp3C = 17.0f; } @@ -3672,7 +3672,7 @@ void Player_MoveArwing360(Player* player) { sp4C.x -= 2.5f; sp4C.y -= 2.5f; } - if (player->arwing.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftWingState <= WINGSTATE_BROKEN) { sp4C.x += 2.5f; sp4C.y -= 2.5f; } @@ -3947,7 +3947,7 @@ void Player_MoveArwingOnRails(Player* player) { player->vel.x += 2.5f; player->vel.y -= 2.5f; } - if (player->arwing.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftWingState <= WINGSTATE_BROKEN) { player->vel.x -= 2.5f; player->vel.y -= 2.5f; } @@ -4417,7 +4417,7 @@ void Player_Setup(Player* playerx) { } player->arwing.rightWingState = WINGSTATE_INTACT; - player->arwing.leftState = WINGSTATE_INTACT; + player->arwing.leftWingState = WINGSTATE_INTACT; if (gExpertMode) { gLeftWingHealth[gPlayerNum] = 10; @@ -4521,7 +4521,7 @@ void Player_Setup(Player* playerx) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; player->arwing.rightWingState = D_ctx_80177CAC; - player->arwing.leftState = D_ctx_80177CB4; + player->arwing.leftWingState = D_ctx_80177CB4; gRightWingHealth[0] = D_ctx_80177CBC; gLeftWingHealth[0] = D_ctx_80177CC4; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index aee12afc..ce2aa84f 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -402,7 +402,7 @@ void CheatRam_Select(void) { } void CheatRam_RepairWings(void) { - if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { + if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN)) { func_enmy_80067A40(); } } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 59fe162d..34f0e79a 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1079,7 +1079,7 @@ void Ending_801926D4(void) { if (!gClearPlayerInfo) { D_ending_80198590 = gPlayer[0].arwing; } else { - D_ending_80198590.rightWingState = D_ending_80198590.leftState = WINGSTATE_INTACT; + D_ending_80198590.rightWingState = D_ending_80198590.leftWingState = WINGSTATE_INTACT; } AUDIO_PLAY_BGM(NA_BGM_STAFF_ROLL); } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 4942bdaf..32b8e7c5 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2377,7 +2377,7 @@ void Venom1_80198414(void) { D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; D_ctx_80177CAC = gPlayer[0].arwing.rightWingState; - D_ctx_80177CB4 = gPlayer[0].arwing.leftState; + D_ctx_80177CB4 = gPlayer[0].arwing.leftWingState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; Audio_StopPlayerNoise(0); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 14037d44..3493e049 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -2600,9 +2600,9 @@ void Andross_AndAndross_Update(AndAndross* this) { Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8); } - if (player->arwing.leftState == 2) { + if (player->arwing.leftWingState == 2) { gLeftWingHealth[0] = 0; - player->arwing.leftState = 1; + player->arwing.leftWingState = 1; Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 9); } diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 000488d0..6bcfdb70 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -125,7 +125,7 @@ void Venom2_UpdateEvents(ActorAllRange* this) { D_ctx_80177C9C = player->shields + 1; D_play_80161A5C = D_ctx_80177CA4 = gHitCount; D_ctx_80177CAC = player->arwing.rightWingState; - D_ctx_80177CB4 = player->arwing.leftState; + D_ctx_80177CB4 = player->arwing.leftWingState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 47d0741e..1aa5cd8b 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2269,7 +2269,7 @@ void Map_801A116C(void) { Matrix_SetGfxMtx(&gMasterDisp); - arwing.rightWingState = arwing.leftState = WINGSTATE_INTACT; + arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; // clang-format off arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 1ea5117a..6204bc53 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2253,7 +2253,7 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); - arwing.rightWingState = arwing.leftState = WINGSTATE_INTACT; + arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f;