replace all ArwingInfo unks for names

This commit is contained in:
Alejandro Javier Asenjo Nitti
2024-08-15 04:01:44 -03:00
parent 02ea67c9cc
commit 76f7d6e335
24 changed files with 150 additions and 145 deletions
+2 -2
View File
@@ -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.modelId = 1;
player->arwing.teamFaceId = 1;
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.modelId = 0;
player->arwing.teamFaceId = 0;
player->unk_014 = 0;
player->unk_018 = 0;
player->unk_01C = 0;
+8 -8
View File
@@ -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.modelId = 1;
player->arwing.teamFaceId = 1;
gCsFrameCount = 0;
/* fallthrough */
case 1:
@@ -776,7 +776,7 @@ void Cutscene_AllRangeMode(Player* player) {
}
}
}
player->arwing.unk_10 = 0.0f;
player->arwing.bottomLeftFlapYrot = 0.0f;
player->arwing.bottomRightFlapYrot = 0.0f;
player->arwing.upperLeftFlapYrot = 0.0f;
player->arwing.upperRightFlapYrot = 0.0f;
@@ -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.modelId = 1;
player->arwing.teamFaceId = 1;
player->csState++;
gCsFrameCount = 0;
/* fallthrough */
@@ -921,11 +921,11 @@ void Cutscene_CoComplete2(Player* player) {
player->arwing.upperRightFlapYrot = 0.0f;
player->arwing.upperLeftFlapYrot = 0.0f;
player->arwing.bottomRightFlapYrot = 0.0f;
player->arwing.unk_10 = 0.0f;
player->arwing.bottomLeftFlapYrot = 0.0f;
player->zRotBarrelRoll = 0.0f;
player->zRotBank = 0.0f;
player->boostSpeed = 0.0f;
player->arwing.modelId = 1;
player->arwing.teamFaceId = 1;
player->baseSpeed = 40.0f;
/* fallthrough */
@@ -1020,7 +1020,7 @@ void Cutscene_CoComplete2(Player* player) {
if (player->csTimer == 0) {
player->csState = 1;
player->csTimer = 150;
player->arwing.unk_10 = 0.0f;
player->arwing.bottomLeftFlapYrot = 0.0f;
player->arwing.bottomRightFlapYrot = 0.0f;
player->arwing.upperLeftFlapYrot = 0.0f;
player->arwing.upperRightFlapYrot = 0.0f;
@@ -1451,7 +1451,7 @@ void Cutscene_UTurn(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);
Math_SmoothStepToF(&player->aerobaticPitch, 190.0f, 0.1f, 6.0f, 0.001f);
@@ -1485,7 +1485,7 @@ void Cutscene_UTurn(Player* player) {
sp58.z = -sp58.y;
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58.z, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, sp58.z, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, sp58.z, 0.3f, 100.0f, 0.0f);
player->unk_190 = 2.0f;
player->cam.eye.x += player->vel.x * 0.1f;
+25 -25
View File
@@ -535,24 +535,24 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos
rot->y -= arwing->bottomRightFlapYrot;
break;
case 5:
rot->y -= arwing->unk_10;
rot->y -= arwing->bottomLeftFlapYrot;
break;
case 6:
rot->y -= arwing->upperLeftFlapYrot;
break;
case 12:
rot->z += arwing->unk_20;
rot->z += arwing->wingsYrot;
break;
case 13:
rot->z += arwing->unk_20;
rot->z += arwing->wingsYrot;
break;
case 4:
pos->z -= arwing->unk_14;
pos->x += arwing->unk_18;
pos->z -= arwing->laserGunsYpos;
pos->x += arwing->laserGunsXpos;
break;
case 8:
pos->z += arwing->unk_14;
pos->x += arwing->unk_18;
pos->z += arwing->laserGunsYpos;
pos->x += arwing->laserGunsXpos;
break;
}
return false;
@@ -560,13 +560,13 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos
void Display_ArwingWings(ArwingInfo* arwing) {
Vec3f sp68[30];
s32 modelId;
s32 teamFaceId;
Matrix_Push(&gGfxMatrix);
arwing->unk_18 = 0.0f;
if (arwing->unk_14 < -7.0f) {
arwing->unk_18 = (-arwing->unk_14 - 7.0f) * 2.5f;
arwing->laserGunsXpos = 0.0f;
if (arwing->laserGunsYpos < -7.0f) {
arwing->laserGunsXpos = (-arwing->laserGunsYpos - 7.0f) * 2.5f;
}
if (gGameState == GSTATE_PLAY) {
@@ -584,31 +584,31 @@ void Display_ArwingWings(ArwingInfo* arwing) {
D_display_800CA22C = false;
modelId = arwing->modelId;
teamFaceId = arwing->teamFaceId;
if (D_display_800CA220 != 0) {
modelId = 1;
teamFaceId = 1;
}
if (modelId != 0) {
if (teamFaceId != 0) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, arwing->unk_34 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, arwing->unk_30 * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, arwing->teamFaceYrot * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, arwing->teamFaceXrot * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY);
if (gGameState == GSTATE_ENDING) {
Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY);
}
Matrix_SetGfxMtx(&gMasterDisp);
if (gExpertMode) {
gSPDisplayList(gMasterDisp++, D_display_800CA27C[modelId - 1]);
gSPDisplayList(gMasterDisp++, D_display_800CA27C[teamFaceId - 1]);
} else {
gSPDisplayList(gMasterDisp++, D_display_800CA26C[modelId - 1]);
gSPDisplayList(gMasterDisp++, D_display_800CA26C[teamFaceId - 1]);
}
Matrix_Pop(&gGfxMatrix);
}
Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, arwing->unk_38 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, arwing->windshieldXrot * M_DTOR, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL_64_2();
@@ -694,7 +694,7 @@ void Display_Arwing(Player* player, s32 reflectY) {
} else {
if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) {
player->arwing.unk_28 = player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot =
player->arwing.upperLeftFlapYrot = player->arwing.unk_10 = 0.0f;
player->arwing.upperLeftFlapYrot = player->arwing.bottomLeftFlapYrot = 0.0f;
}
D_display_800CA22C = true;
gReflectY = reflectY;
@@ -1018,7 +1018,7 @@ void Display_ArwingLaserCharge(Player* player) {
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
laserStrength = gLaserStrength[player->num];
if (player->arwing.unk_14 > -8.0f) {
if (player->arwing.laserGunsYpos > -8.0f) {
laserStrength = LASERS_SINGLE;
}
@@ -1620,8 +1620,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
switch (D_display_800CA220) {
case 0:
Math_SmoothStepToAngle(&player->arwing.unk_30, 0.0f, 0.2f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&player->arwing.unk_34, 0.0f, 0.2f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&player->arwing.teamFaceXrot, 0.0f, 0.2f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&player->arwing.teamFaceYrot, 0.0f, 0.2f, 3.0f, 0.0f);
gPlayCamEye.x = player->cam.eye.x;
gPlayCamEye.y = player->cam.eye.y;
gPlayCamEye.z = player->cam.eye.z;
@@ -1651,8 +1651,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
}
sp3C = 360.0f - sp3C;
Math_SmoothStepToAngle(&player->arwing.unk_30, sp38, 0.2f, 6.0f, 0.0f);
Math_SmoothStepToAngle(&player->arwing.unk_34, sp3C, 0.2f, 6.0f, 0.0f);
Math_SmoothStepToAngle(&player->arwing.teamFaceXrot, sp38, 0.2f, 6.0f, 0.0f);
Math_SmoothStepToAngle(&player->arwing.teamFaceYrot, sp3C, 0.2f, 6.0f, 0.0f);
Math_SmoothStepToF(&D_display_800CA380, gControllerPress[0].stick_y * 0.75f, 0.1f, 2.0f, 0.0f);
Math_SmoothStepToF(&D_display_800CA384, gControllerPress[0].stick_x * 3.0f, 0.1f, 5.0f, 0.0f);
+8 -8
View File
@@ -535,16 +535,16 @@ void func_edisplay_8005B388(Actor199* actor) {
D_edisplay_80161630.upperRightFlapYrot = actor->fwork[15];
D_edisplay_80161630.upperLeftFlapYrot = actor->fwork[16];
D_edisplay_80161630.bottomRightFlapYrot = actor->fwork[26];
D_edisplay_80161630.unk_10 = actor->fwork[27];
D_edisplay_80161630.unk_14 = D_edisplay_80161630.unk_18 = D_edisplay_80161630.unk_1C =
D_edisplay_80161630.unk_20 = D_edisplay_80161630.unk_38 = D_edisplay_80161630.unk_24 = 0.0f;
D_edisplay_80161630.bottomLeftFlapYrot = actor->fwork[27];
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.modelId = actor->iwork[14];
D_edisplay_80161630.unk_30 = actor->fwork[20];
D_edisplay_80161630.unk_34 = actor->fwork[19];
D_edisplay_80161630.teamFaceId = actor->iwork[14];
D_edisplay_80161630.teamFaceXrot = actor->fwork[20];
D_edisplay_80161630.teamFaceYrot = actor->fwork[19];
if (gLevelType == LEVELTYPE_SPACE) {
D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = D_edisplay_80161630.upperLeftFlapYrot =
D_edisplay_80161630.unk_10 = 0.0f;
D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot =
D_edisplay_80161630.upperLeftFlapYrot = D_edisplay_80161630.bottomLeftFlapYrot = 0.0f;
}
Display_ArwingWings(&D_edisplay_80161630);
} else if (gLevelType == LEVELTYPE_PLANET) {
+4 -4
View File
@@ -2570,25 +2570,25 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
break;
case EVC_SINGLE_LASER:
if (gPlayer[0].arwing.unk_14 > -8.0f) {
if (gPlayer[0].arwing.laserGunsYpos > -8.0f) {
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TWIN_LASER:
if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) {
if ((gPlayer[0].arwing.laserGunsYpos < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) {
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HYPER_LASER:
if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) {
if ((gPlayer[0].arwing.laserGunsYpos < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) {
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK3_LASER:
if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) {
if ((gPlayer[0].arwing.laserGunsYpos < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) {
ActorEvent_TriggerBranch(this);
}
break;
+15 -15
View File
@@ -3027,7 +3027,7 @@ void Player_ArwingLaser(Player* player) {
LaserStrength laser;
laser = gLaserStrength[gPlayerNum];
if (player->arwing.unk_14 > -8.0f) {
if (player->arwing.laserGunsYpos > -8.0f) {
laser = LASERS_SINGLE;
}
@@ -3301,9 +3301,9 @@ void Player_Shoot(Player* player) {
if (!Player_UpdateLockOn(player)) {
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
Math_SmoothStepToF(&player->arwing.unk_14, -10.0f, 1.0f, 0.5f, 0.0f);
Math_SmoothStepToF(&player->arwing.laserGunsYpos, -10.0f, 1.0f, 0.5f, 0.0f);
} else {
Math_SmoothStepToF(&player->arwing.unk_14, 0.0f, 1.0f, 0.5f, 0.0f);
Math_SmoothStepToF(&player->arwing.laserGunsYpos, 0.0f, 1.0f, 0.5f, 0.0f);
}
if (gShootButton[player->num] & gInputPress->button) {
Player_ArwingLaser(player);
@@ -3366,7 +3366,7 @@ void Player_ArwingBank(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0.f);
if (player->pos.y < (gGroundHeight + 70.0f)) {
player->pos.y += 6.0f;
}
@@ -3380,7 +3380,7 @@ void Player_ArwingBank(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f);
if (player->pos.y < (gGroundHeight + 70.0f)) {
player->pos.y += 6.0f;
}
@@ -3601,7 +3601,7 @@ void Player_MoveArwing360(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -sp60 + sp5C, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -sp60 - sp5C, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -sp60 + sp58, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -sp60 - sp58, 0.1f, 100.0f, 0.0f);
scale = 0.1f;
if ((player->zRotBank > 10.0f) && (sp7C > 0)) {
@@ -3736,7 +3736,7 @@ void Player_PerformLoop(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, sp58, 0.3f, 100.0f, 0.0f);
if (player->aerobaticPitch < 180.0f) {
player->pos.y += 2.0f;
@@ -3864,7 +3864,7 @@ void Player_MoveArwingOnRails(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f);
}
sp84 = 0.1f;
@@ -4793,7 +4793,7 @@ void Player_Setup(Player* playerx) {
}
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
player->arwing.unk_14 = -10.0f;
player->arwing.laserGunsYpos = -10.0f;
}
gPauseEnabled = false;
}
@@ -5037,7 +5037,7 @@ void Player_ArwingBoost(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f);
}
player->boostMeter += sp28;
if (player->boostMeter > 90.0f) {
@@ -5135,7 +5135,7 @@ void Player_ArwingBrake(Player* player) {
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f);
}
player->boostMeter += sp30;
@@ -5784,14 +5784,14 @@ void Player_Update(Player* player) {
case PLAYERSTATE_1C8_LEVEL_INTRO:
gShowHud = 0;
gPauseEnabled = false;
player->arwing.modelId = 1;
player->arwing.teamFaceId = 1;
Cutscene_LevelStart(player);
break;
case PLAYERSTATE_1C8_ACTIVE:
gShowHud = 1;
Player_LowHealthMsg(player);
player->arwing.modelId = 0;
player->arwing.teamFaceId = 0;
D_hud_80161704 = 255;
if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) &&
@@ -5862,12 +5862,12 @@ void Player_Update(Player* player) {
gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] =
gVsLockOnTimers[player->num][3] = 0;
}
player->arwing.modelId = 1;
player->arwing.teamFaceId = 1;
Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 0.0f, 0.1f, 5.0f, 0);
Player_UpdateShields(player);
Cutscene_UTurn(player);