wings -> arwing

This commit is contained in:
Alejandro Javier Asenjo Nitti 2024-08-15 02:52:41 -03:00
parent 8d3d4cd2d0
commit e073a7d0d7
27 changed files with 242 additions and 241 deletions

View File

@ -316,7 +316,7 @@ typedef struct Player {
/* 0x46C */ f32 sfxVel[3];
/* 0x478 */ PlayerSfx sfx;
/* 0x498 */ s32 mercyTimer;
/* 0x49C */ ArwingInfo wings;
/* 0x49C */ ArwingInfo arwing;
/* 0x4D8 */ f32 aerobaticPitch;
/* 0x4DC */ bool somersault;
} Player; // size = 0x4E0

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->wings.modelId = 1;
player->arwing.modelId = 1;
player->csState++;
break;
@ -199,8 +199,8 @@ void AllRange_GreatFoxRepair(Player* player) {
gCsCamEyeZ = 305.0f;
player->shields = Play_GetMaxShields();
player->wings.rightState = WINGSTATE_INTACT;
player->wings.leftState = WINGSTATE_INTACT;
player->arwing.rightState = WINGSTATE_INTACT;
player->arwing.leftState = WINGSTATE_INTACT;
if (gExpertMode) {
gRightWingHealth[0] = gLeftWingHealth[0] = 10;
@ -230,7 +230,7 @@ void AllRange_GreatFoxRepair(Player* player) {
player->rot.x += 0.4f;
if (gCsFrameCount >= 130) {
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
player->wings.modelId = 0;
player->arwing.modelId = 0;
player->unk_014 = 0;
player->unk_018 = 0;
player->unk_01C = 0;

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->wings.modelId = 1;
player->arwing.modelId = 1;
gCsFrameCount = 0;
/* fallthrough */
case 1:
@ -776,10 +776,10 @@ void Cutscene_AllRangeMode(Player* player) {
}
}
}
player->wings.unk_10 = 0.0f;
player->wings.unk_08 = 0.0f;
player->wings.unk_0C = 0.0f;
player->wings.unk_04 = 0.0f;
player->arwing.unk_10 = 0.0f;
player->arwing.unk_08 = 0.0f;
player->arwing.unk_0C = 0.0f;
player->arwing.unk_04 = 0.0f;
Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f);
Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 5.0f, 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->wings.modelId = 1;
player->arwing.modelId = 1;
player->csState++;
gCsFrameCount = 0;
/* fallthrough */
@ -918,14 +918,14 @@ void Cutscene_CoComplete2(Player* player) {
case 10:
D_ctx_80177A48[2] = 0.0f;
player->csState++;
player->wings.unk_04 = 0.0f;
player->wings.unk_0C = 0.0f;
player->wings.unk_08 = 0.0f;
player->wings.unk_10 = 0.0f;
player->arwing.unk_04 = 0.0f;
player->arwing.unk_0C = 0.0f;
player->arwing.unk_08 = 0.0f;
player->arwing.unk_10 = 0.0f;
player->zRotBarrelRoll = 0.0f;
player->zRotBank = 0.0f;
player->boostSpeed = 0.0f;
player->wings.modelId = 1;
player->arwing.modelId = 1;
player->baseSpeed = 40.0f;
/* fallthrough */
@ -1020,10 +1020,10 @@ void Cutscene_CoComplete2(Player* player) {
if (player->csTimer == 0) {
player->csState = 1;
player->csTimer = 150;
player->wings.unk_10 = 0.0f;
player->wings.unk_08 = 0.0f;
player->wings.unk_0C = 0.0f;
player->wings.unk_04 = 0.0f;
player->arwing.unk_10 = 0.0f;
player->arwing.unk_08 = 0.0f;
player->arwing.unk_0C = 0.0f;
player->arwing.unk_04 = 0.0f;
}
break;
@ -1448,10 +1448,10 @@ void Cutscene_UTurn(Player* player) {
sp58.y = 60.0f;
}
Math_SmoothStepToF(&player->wings.unk_04, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, 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->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);
Math_SmoothStepToF(&player->aerobaticPitch, 190.0f, 0.1f, 6.0f, 0.001f);
@ -1479,13 +1479,13 @@ void Cutscene_UTurn(Player* player) {
sp58.y = player->zRotBank * 0.3f;
Math_SmoothStepToF(&player->wings.unk_04, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, sp58.y, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f);
sp58.z = -sp58.y;
Math_SmoothStepToF(&player->wings.unk_0C, sp58.z, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, sp58.z, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, sp58.z, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, sp58.z, 0.3f, 100.0f, 0.0f);
player->unk_190 = 2.0f;
player->cam.eye.x += player->vel.x * 0.1f;
@ -1689,14 +1689,14 @@ void Cutscene_ArwingDown360(Player* player) {
func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 3.0f);
}
if (player->wings.rightState == WINGSTATE_INTACT) {
if (player->arwing.rightState == WINGSTATE_INTACT) {
Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z);
player->wings.rightState = WINGSTATE_BROKEN;
player->arwing.rightState = WINGSTATE_BROKEN;
func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f);
}
if (player->wings.leftState == WINGSTATE_INTACT) {
if (player->arwing.leftState == WINGSTATE_INTACT) {
Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z);
player->wings.leftState = WINGSTATE_BROKEN;
player->arwing.leftState = 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) ||
@ -1796,15 +1796,15 @@ void Cutscene_ArwingDownOnRails(Player* player) {
func_enmy_80062C38(player->pos.x, player->pos.z);
}
if (player->wings.rightState == WINGSTATE_INTACT) {
if (player->arwing.rightState == WINGSTATE_INTACT) {
Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z);
player->wings.rightState = WINGSTATE_NONE;
player->arwing.rightState = WINGSTATE_NONE;
func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f);
}
if (player->wings.leftState == WINGSTATE_INTACT) {
if (player->arwing.leftState == WINGSTATE_INTACT) {
Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z);
player->wings.leftState = WINGSTATE_NONE;
player->arwing.leftState = 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)) &&

View File

@ -450,7 +450,7 @@ void Display_SetCullingMode(void) {
}
bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) {
ArwingInfo* wings = (ArwingInfo*) wingData;
ArwingInfo* arwing = (ArwingInfo*) wingData;
if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
@ -459,10 +459,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos
switch (limbIndex) {
case 13:
if (wings->rightState == WINGSTATE_NONE) {
if (arwing->rightState == WINGSTATE_NONE) {
*gfxPtr = NULL;
}
if (wings->rightState == WINGSTATE_BROKEN) {
if (arwing->rightState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3015120;
}
if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) {
@ -478,7 +478,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos
case 1:
case 2:
if (wings->rightState != 2) {
if (arwing->rightState != 2) {
*gfxPtr = NULL;
}
if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) {
@ -493,10 +493,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos
break;
case 12:
if (wings->rightState == WINGSTATE_NONE) { // should be leftState?
if (arwing->rightState == WINGSTATE_NONE) { // should be leftState?
*gfxPtr = NULL;
}
if (wings->leftState == WINGSTATE_BROKEN) {
if (arwing->leftState == 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 (wings->leftState != 2) {
if (arwing->leftState != 2) {
*gfxPtr = NULL;
}
if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) {
@ -529,62 +529,62 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos
switch (limbIndex) {
case 1:
rot->y -= wings->unk_04;
rot->y -= arwing->unk_04;
break;
case 2:
rot->y -= wings->unk_08;
rot->y -= arwing->unk_08;
break;
case 5:
rot->y -= wings->unk_10;
rot->y -= arwing->unk_10;
break;
case 6:
rot->y -= wings->unk_0C;
rot->y -= arwing->unk_0C;
break;
case 12:
rot->z += wings->unk_20;
rot->z += arwing->unk_20;
break;
case 13:
rot->z += wings->unk_20;
rot->z += arwing->unk_20;
break;
case 4:
pos->z -= wings->unk_14;
pos->x += wings->unk_18;
pos->z -= arwing->unk_14;
pos->x += arwing->unk_18;
break;
case 8:
pos->z += wings->unk_14;
pos->x += wings->unk_18;
pos->z += arwing->unk_14;
pos->x += arwing->unk_18;
break;
}
return false;
}
void Display_ArwingWings(ArwingInfo* wings) {
void Display_ArwingWings(ArwingInfo* arwing) {
Vec3f sp68[30];
s32 modelId;
Matrix_Push(&gGfxMatrix);
wings->unk_18 = 0.0f;
if (wings->unk_14 < -7.0f) {
wings->unk_18 = (-wings->unk_14 - 7.0f) * 2.5f;
arwing->unk_18 = 0.0f;
if (arwing->unk_14 < -7.0f) {
arwing->unk_18 = (-arwing->unk_14 - 7.0f) * 2.5f;
}
if (gGameState == GSTATE_PLAY) {
Animation_DrawSkeleton(1, D_arwing_3016610, gPlayer[0].jointTable, Display_ArwingWingsOverrideLimbDraw, NULL,
wings, &gIdentityMatrix);
arwing, &gIdentityMatrix);
} else {
if (gGameState == GSTATE_MENU) {
Animation_GetFrameData(&D_arwing_3015AF4, 0, sp68);
} else {
Animation_GetFrameData(&D_arwing_3015C28, 0, sp68);
}
Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, wings,
Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, arwing,
&gIdentityMatrix);
}
D_display_800CA22C = false;
modelId = wings->modelId;
modelId = arwing->modelId;
if (D_display_800CA220 != 0) {
modelId = 1;
}
@ -592,8 +592,8 @@ void Display_ArwingWings(ArwingInfo* wings) {
if (modelId != 0) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, arwing->unk_34 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, arwing->unk_30 * 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);
@ -608,7 +608,7 @@ void Display_ArwingWings(ArwingInfo* wings) {
}
Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, arwing->unk_38 * M_DTOR, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL_64_2();
@ -679,25 +679,25 @@ void Display_Arwing(Player* player, s32 reflectY) {
}
} else {
if (gVersusMode) {
if ((player->wings.rightState == WINGSTATE_INTACT) && (player->wings.leftState == WINGSTATE_INTACT)) {
if ((player->arwing.rightState == WINGSTATE_INTACT) && (player->arwing.leftState == WINGSTATE_INTACT)) {
gSPDisplayList(gMasterDisp++, D_versus_300EE80);
} else if ((player->wings.rightState <= WINGSTATE_BROKEN) &&
(player->wings.leftState == WINGSTATE_INTACT)) {
} else if ((player->arwing.rightState <= WINGSTATE_BROKEN) &&
(player->arwing.leftState == WINGSTATE_INTACT)) {
gSPDisplayList(gMasterDisp++, D_versus_3010A90);
} else if ((player->wings.rightState == WINGSTATE_INTACT) &&
(player->wings.leftState <= WINGSTATE_BROKEN)) {
} else if ((player->arwing.rightState == WINGSTATE_INTACT) &&
(player->arwing.leftState <= WINGSTATE_BROKEN)) {
gSPDisplayList(gMasterDisp++, D_versus_3011470);
} else {
gSPDisplayList(gMasterDisp++, D_versus_300D550);
}
} else {
if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) {
player->wings.unk_28 = player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C =
player->wings.unk_10 = 0.0f;
player->arwing.unk_28 = player->arwing.unk_04 = player->arwing.unk_08 = player->arwing.unk_0C =
player->arwing.unk_10 = 0.0f;
}
D_display_800CA22C = true;
gReflectY = reflectY;
Display_ArwingWings(&player->wings);
Display_ArwingWings(&player->arwing);
}
}
}
@ -1017,7 +1017,7 @@ void Display_ArwingLaserCharge(Player* player) {
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
laserStrength = gLaserStrength[player->num];
if (player->wings.unk_14 > -8.0f) {
if (player->arwing.unk_14 > -8.0f) {
laserStrength = LASERS_SINGLE;
}
@ -1232,7 +1232,7 @@ void Display_ArwingWingTrail_Draw(Player* player) {
RCP_SetupDL_64();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
if (player->wings.leftState == WINGSTATE_INTACT) {
if (player->arwing.leftState == WINGSTATE_INTACT) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY);
@ -1245,7 +1245,7 @@ void Display_ArwingWingTrail_Draw(Player* player) {
gSPDisplayList(gMasterDisp++, D_102A8A0);
Matrix_Pop(&gGfxMatrix);
}
if (player->wings.rightState == WINGSTATE_INTACT) {
if (player->arwing.rightState == WINGSTATE_INTACT) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY);
@ -1619,8 +1619,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
switch (D_display_800CA220) {
case 0:
Math_SmoothStepToAngle(&player->wings.unk_30, 0.0f, 0.2f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&player->wings.unk_34, 0.0f, 0.2f, 3.0f, 0.0f);
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);
gPlayCamEye.x = player->cam.eye.x;
gPlayCamEye.y = player->cam.eye.y;
gPlayCamEye.z = player->cam.eye.z;
@ -1650,8 +1650,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
}
sp3C = 360.0f - sp3C;
Math_SmoothStepToAngle(&player->wings.unk_30, sp38, 0.2f, 6.0f, 0.0f);
Math_SmoothStepToAngle(&player->wings.unk_34, sp3C, 0.2f, 6.0f, 0.0f);
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_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);

View File

@ -524,8 +524,8 @@ void func_edisplay_8005B388(Actor199* actor) {
(gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) ||
((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) &&
(actor->state == 5))) {
D_edisplay_80161630.rightState = gPlayer[0].wings.rightState;
D_edisplay_80161630.leftState = gPlayer[0].wings.leftState;
D_edisplay_80161630.rightState = gPlayer[0].arwing.rightState;
D_edisplay_80161630.leftState = gPlayer[0].arwing.leftState;
} else {
D_edisplay_80161630.rightState = D_edisplay_80161630.leftState = WINGSTATE_INTACT;
}

View File

@ -2107,7 +2107,8 @@ void ActorSupplies_Update(ActorSupplies* this) {
Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S);
func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f);
if (((player[0].wings.rightState <= WINGSTATE_BROKEN) || (player[0].wings.leftState <= WINGSTATE_BROKEN)) &&
if (((player[0].arwing.rightState <= WINGSTATE_BROKEN) ||
(player[0].arwing.leftState <= WINGSTATE_BROKEN)) &&
(player[0].form != FORM_LANDMASTER)) {
this->itemDrop = DROP_WING_REPAIR;
} else if (gPlayer[0].shields < 128) {
@ -2160,13 +2161,13 @@ void ActorSupplies_Draw(Actor* this) {
void func_enmy_80067A40(void) {
AUDIO_PLAY_SFX(NA_SE_WING_REPAIR, gPlayer[0].sfxSource, 0);
if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) {
if (gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) {
gRightWingFlashTimer[0] = 1050;
gPlayer[0].wings.rightState = WINGSTATE_INTACT;
gPlayer[0].arwing.rightState = WINGSTATE_INTACT;
}
if (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) {
if (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) {
gLeftWingFlashTimer[0] = 1050;
gPlayer[0].wings.leftState = WINGSTATE_INTACT;
gPlayer[0].arwing.leftState = WINGSTATE_INTACT;
}
if (gExpertMode) {
@ -2260,7 +2261,7 @@ void ItemPickup_Update(Item* this) {
void ItemLasers_Update(ItemLasers* this) {
if (!gVersusMode &&
((gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN))) {
((gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN))) {
this->obj.id = OBJ_ITEM_WING_REPAIR;
Object_SetInfo(&this->info, this->obj.id);
this->timer_48 = 2000;

View File

@ -2570,25 +2570,25 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
break;
case EVC_SINGLE_LASER:
if (gPlayer[0].wings.unk_14 > -8.0f) {
if (gPlayer[0].arwing.unk_14 > -8.0f) {
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TWIN_LASER:
if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) {
if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) {
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HYPER_LASER:
if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) {
if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) {
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK3_LASER:
if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) {
if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) {
ActorEvent_TriggerBranch(this);
}
break;
@ -2688,7 +2688,8 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
break;
case EVC_WING_BROKEN:
if ((gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN)) {
if ((gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) ||
(gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) {
ActorEvent_TriggerBranch(this);
}
break;

View File

@ -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->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) {
if ((player->arwing.rightState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) {
player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f;
} else {
player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f;
@ -183,7 +183,7 @@ void Player_DamageEffects(Player* player) {
f32 sp40;
if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (player->wings.rightState <= WINGSTATE_BROKEN) {
if (player->arwing.rightState <= WINGSTATE_BROKEN) {
if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) {
func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y,
player->hit1.z, 1.0f);
@ -194,7 +194,7 @@ void Player_DamageEffects(Player* player) {
RAND_FLOAT(0.02f) + 0.02f, player->num + 1);
}
}
if (player->wings.leftState <= WINGSTATE_BROKEN) {
if (player->arwing.leftState <= 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);
@ -823,11 +823,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) {
if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) {
if (side == 1) {
gRightWingFlashTimer[player->num] = 30;
if (player->wings.rightState == WINGSTATE_INTACT) {
if (player->arwing.rightState == WINGSTATE_INTACT) {
gRightWingHealth[player->num] -= damage;
if (gRightWingHealth[player->num] <= 0) {
Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z);
player->wings.rightState = WINGSTATE_BROKEN;
player->arwing.rightState = WINGSTATE_BROKEN;
func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f);
gRightWingDebrisTimer[player->num] = 50;
Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num);
@ -838,11 +838,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) {
}
} else if (side == 2) {
gLeftWingFlashTimer[player->num] = 30;
if (player->wings.leftState == WINGSTATE_INTACT) {
if (player->arwing.leftState == WINGSTATE_INTACT) {
gLeftWingHealth[player->num] -= damage;
if (gLeftWingHealth[player->num] <= 0) {
Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z);
player->wings.leftState = WINGSTATE_BROKEN;
player->arwing.leftState = 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->wings.leftState == WINGSTATE_INTACT) {
if (player->arwing.leftState == WINGSTATE_INTACT) {
sp3C.x = 40.0f;
} else {
sp3C.y = -10.0f;
@ -1632,7 +1632,7 @@ void Player_UpdateHitbox(Player* player) {
}
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit2);
if (player->wings.rightState == WINGSTATE_INTACT) {
if (player->arwing.rightState == WINGSTATE_INTACT) {
sp3C.x = -40.0f;
} else {
sp3C.x = -30.0f;
@ -3026,7 +3026,7 @@ void Player_ArwingLaser(Player* player) {
LaserStrength laser;
laser = gLaserStrength[gPlayerNum];
if (player->wings.unk_14 > -8.0f) {
if (player->arwing.unk_14 > -8.0f) {
laser = LASERS_SINGLE;
}
@ -3293,15 +3293,15 @@ bool Player_UpdateLockOn(Player* player) {
void Player_Shoot(Player* player) {
switch (player->form) {
case FORM_ARWING:
if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) {
if ((player->arwing.rightState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) {
gLaserStrength[player->num] = LASERS_SINGLE;
}
if (!Player_UpdateLockOn(player)) {
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
Math_SmoothStepToF(&player->wings.unk_14, -10.0f, 1.0f, 0.5f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_14, -10.0f, 1.0f, 0.5f, 0.0f);
} else {
Math_SmoothStepToF(&player->wings.unk_14, 0.0f, 1.0f, 0.5f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_14, 0.0f, 1.0f, 0.5f, 0.0f);
}
if (gShootButton[player->num] & gInputPress->button) {
Player_ArwingLaser(player);
@ -3349,9 +3349,9 @@ void Player_ArwingBank(Player* player) {
f32 sp38;
sp3C = 0.0f;
if ((player->wings.rightState <= WINGSTATE_BROKEN) && (player->wings.leftState == WINGSTATE_INTACT)) {
if ((player->arwing.rightState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) {
sp3C = -17.0f;
} else if ((player->wings.leftState <= WINGSTATE_BROKEN) && (player->wings.rightState == WINGSTATE_INTACT)) {
} else if ((player->arwing.leftState <= WINGSTATE_BROKEN) && (player->arwing.rightState == WINGSTATE_INTACT)) {
sp3C = 17.0f;
}
@ -3360,10 +3360,10 @@ void Player_ArwingBank(Player* player) {
sp3C = 90.0f;
sp38 = 0.2f;
if (player->zRotBank < 70.0f) {
Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->arwing.unk_04, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0.f);
Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f);
if (player->pos.y < (gGroundHeight + 70.0f)) {
player->pos.y += 6.0f;
}
@ -3374,10 +3374,10 @@ void Player_ArwingBank(Player* player) {
sp3C = -90.0f;
sp38 = 0.2f;
if (player->zRotBank > -70.0f) {
Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, 70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f);
if (player->pos.y < (gGroundHeight + 70.0f)) {
player->pos.y += 6.0f;
}
@ -3594,11 +3594,11 @@ void Player_MoveArwing360(Player* player) {
sp58 = sp40.x;
}
Math_SmoothStepToF(&player->wings.unk_28, 0.0f, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_04, -sp60 + sp5C, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, -sp60 + sp5C, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f);
scale = 0.1f;
if ((player->zRotBank > 10.0f) && (sp7C > 0)) {
@ -3668,11 +3668,11 @@ void Player_MoveArwing360(Player* player) {
sp4C.x = 0.0f;
sp4C.y = 0.0f;
if (player->wings.rightState <= WINGSTATE_BROKEN) {
if (player->arwing.rightState <= WINGSTATE_BROKEN) {
sp4C.x -= 2.5f;
sp4C.y -= 2.5f;
}
if (player->wings.leftState <= WINGSTATE_BROKEN) {
if (player->arwing.leftState <= WINGSTATE_BROKEN) {
sp4C.x += 2.5f;
sp4C.y -= 2.5f;
}
@ -3730,10 +3730,10 @@ void Player_PerformLoop(Player* player) {
sp58 = -50.0f;
}
Math_SmoothStepToF(&player->wings.unk_04, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, sp58, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f);
if (player->aerobaticPitch < 180.0f) {
player->pos.y += 2.0f;
@ -3857,20 +3857,19 @@ void Player_MoveArwingOnRails(Player* player) {
if (sp5C.x > 5.0f) {
sp74 = sp5C.x;
}
Math_SmoothStepToF(&player->wings.unk_28, 0.0f, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_04, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f);
}
sp84 = 0.1f;
if ((player->zRotBank > 10.0f) && (stickX > 0)) {
sp84 = 0.2f;
gPlayerTurnRate *= 2.0f;
}
if ((player->zRotBank < (-10.0f)) && (stickX < 0)) {
if ((player->zRotBank < -10.0f) && (stickX < 0)) {
sp84 = 0.2f;
gPlayerTurnRate *= 2.0f;
}
@ -3944,11 +3943,11 @@ void Player_MoveArwingOnRails(Player* player) {
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50);
if (player->wings.rightState <= WINGSTATE_BROKEN) {
if (player->arwing.rightState <= WINGSTATE_BROKEN) {
player->vel.x += 2.5f;
player->vel.y -= 2.5f;
}
if (player->wings.leftState <= WINGSTATE_BROKEN) {
if (player->arwing.leftState <= WINGSTATE_BROKEN) {
player->vel.x -= 2.5f;
player->vel.y -= 2.5f;
}
@ -4417,8 +4416,8 @@ void Player_Setup(Player* playerx) {
}
}
player->wings.rightState = WINGSTATE_INTACT;
player->wings.leftState = WINGSTATE_INTACT;
player->arwing.rightState = WINGSTATE_INTACT;
player->arwing.leftState = WINGSTATE_INTACT;
if (gExpertMode) {
gLeftWingHealth[gPlayerNum] = 10;
@ -4521,8 +4520,8 @@ void Player_Setup(Player* playerx) {
if (D_ctx_80177C9C != 0) {
player->shields = D_ctx_80177C9C - 1;
gGoldRingCount[0] = D_ctx_80177C94;
player->wings.rightState = D_ctx_80177CAC;
player->wings.leftState = D_ctx_80177CB4;
player->arwing.rightState = D_ctx_80177CAC;
player->arwing.leftState = D_ctx_80177CB4;
gRightWingHealth[0] = D_ctx_80177CBC;
gLeftWingHealth[0] = D_ctx_80177CC4;
if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
@ -4791,7 +4790,7 @@ void Player_Setup(Player* playerx) {
}
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
player->wings.unk_14 = -10.0f;
player->arwing.unk_14 = -10.0f;
}
gPauseEnabled = false;
}
@ -5031,11 +5030,11 @@ void Player_ArwingBoost(Player* player) {
}
}
if (gLevelType == LEVELTYPE_PLANET) {
player->wings.unk_28 += (35.0f - player->wings.unk_28) * 0.1f;
Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.5f, 100.0f, 0.0f);
player->arwing.unk_28 += (35.0f - player->arwing.unk_28) * 0.1f;
Math_SmoothStepToF(&player->arwing.unk_04, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f);
}
player->boostMeter += sp28;
if (player->boostMeter > 90.0f) {
@ -5130,10 +5129,10 @@ void Player_ArwingBrake(Player* player) {
}
if (gLevelType == LEVELTYPE_PLANET) {
Math_SmoothStepToF(&player->wings.unk_04, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, -90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, -90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, -90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f);
}
player->boostMeter += sp30;
@ -5782,14 +5781,14 @@ void Player_Update(Player* player) {
case PLAYERSTATE_1C8_LEVEL_INTRO:
gShowHud = 0;
gPauseEnabled = false;
player->wings.modelId = 1;
player->arwing.modelId = 1;
Cutscene_LevelStart(player);
break;
case PLAYERSTATE_1C8_ACTIVE:
gShowHud = 1;
Player_LowHealthMsg(player);
player->wings.modelId = 0;
player->arwing.modelId = 0;
D_hud_80161704 = 255;
if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) &&
@ -5860,12 +5859,12 @@ void Player_Update(Player* player) {
gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] =
gVsLockOnTimers[player->num][3] = 0;
}
player->wings.modelId = 1;
player->arwing.modelId = 1;
Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_04, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.1f, 5.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0);
Player_UpdateShields(player);
Cutscene_UTurn(player);

View File

@ -402,7 +402,7 @@ void CheatRam_Select(void) {
}
void CheatRam_RepairWings(void) {
if ((gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN)) {
if ((gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) {
func_enmy_80067A40();
}
}

View File

@ -1077,7 +1077,7 @@ void Ending_801926D4(void) {
if ((0 <= D_ending_80192E70) && (D_ending_80192E70 < 100)) {
D_ending_80192E70 = 100;
if (!gClearPlayerInfo) {
D_ending_80198590 = gPlayer[0].wings;
D_ending_80198590 = gPlayer[0].arwing;
} else {
D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT;
}

View File

@ -2964,7 +2964,7 @@ void Corneria_LevelStart(Player* player) {
Corneria_SpawnClouds();
player->wings.unk_30 = 0;
player->arwing.unk_30 = 0;
switch (player->csState) {
case 0: // LevelStart initialization
@ -3037,7 +3037,7 @@ void Corneria_LevelStart(Player* player) {
}
if ((player->csTimer < 190) && (player->csTimer > 150)) {
Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_24, 2.0f, 0.2f, 0.5f, 0.0f);
}
if (player->csTimer < 150) {
@ -3082,7 +3082,7 @@ void Corneria_LevelStart(Player* player) {
}
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
player->arwing.unk_30 = 5.0f;
}
break;
@ -3094,7 +3094,7 @@ void Corneria_LevelStart(Player* player) {
}
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
player->arwing.unk_30 = 5.0f;
}
gCsCamEyeY = player->pos.y + 10.0f;
@ -3103,7 +3103,7 @@ void Corneria_LevelStart(Player* player) {
case 4:
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
player->arwing.unk_30 = 5.0f;
}
Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f);
@ -3250,9 +3250,9 @@ void Corneria_LevelStart(Player* player) {
}
// Fox's head rotates back and forth as he speaks.
player->wings.unk_30 = 0.0f;
player->arwing.unk_30 = 0.0f;
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
player->arwing.unk_30 = 5.0f;
}
if (player->csTimer == 80) {
@ -3362,11 +3362,11 @@ void Corneria_LevelStart(Player* player) {
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->yBob, D_ctx_80177A48[0], 20000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f);
player->wings.unk_08 = player->wings.unk_04;
player->wings.unk_10 = player->wings.unk_0C;
player->arwing.unk_08 = player->arwing.unk_04;
player->arwing.unk_10 = player->arwing.unk_0C;
player->cam.eye.y -= 3.0f;
player->cam.at.y -= 3.0f;
@ -3450,7 +3450,7 @@ void Corneria_LevelComplete1(Player* player) {
f32 temp_fa1;
f32 temp_deg;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f;
player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f;
Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f);
Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);

View File

@ -2376,8 +2376,8 @@ void Venom1_80198414(void) {
D_ctx_80177C94 = gGoldRingCount[0];
D_ctx_80177C9C = gPlayer[0].shields + 1;
D_ctx_80177CA4 = gHitCount;
D_ctx_80177CAC = gPlayer[0].wings.rightState;
D_ctx_80177CB4 = gPlayer[0].wings.leftState;
D_ctx_80177CAC = gPlayer[0].arwing.rightState;
D_ctx_80177CB4 = gPlayer[0].arwing.leftState;
D_ctx_80177CBC = gRightWingHealth[0];
D_ctx_80177CC4 = gLeftWingHealth[0];
Audio_StopPlayerNoise(0);

View File

@ -2020,7 +2020,7 @@ void Meteo_LevelStart(Player* player) {
}
if (gCsFrameCount > 660) {
player->wings.modelId = 0;
player->arwing.modelId = 0;
}
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->wings.modelId = 1;
player->arwing.modelId = 1;
gCsFrameCount = 0;

View File

@ -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->wings.modelId = 1;
player->arwing.modelId = 1;
Play_ClearObjectData();
case 1:

View File

@ -2653,7 +2653,7 @@ void Area6_LevelComplete(Player* player) {
case 0:
gCsFrameCount = 0;
player->csState = 1;
player->wings.modelId = 1;
player->arwing.modelId = 1;
player->unk_194 = 5.0f;
player->unk_190 = 2.0f;
player->baseSpeed = 60.0f;

View File

@ -697,10 +697,10 @@ void Aquas_801AA4BC(Player* player) {
rotBankTarget = 90.0f;
rotBankScale = 0.2f;
if (player->zRotBank < 70.0f) {
Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_04, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0);
}
}
@ -708,10 +708,10 @@ void Aquas_801AA4BC(Player* player) {
rotBankTarget = -90.0f;
rotBankScale = 0.2f;
if (player->zRotBank > -70.0f) {
Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_04, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0);
Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0);
}
}

View File

@ -3149,7 +3149,7 @@ void Solar_LevelComplete(Player* player) {
player->camRoll = player->aerobaticPitch = 0.0f;
player->baseSpeed = 40.0f;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 =
player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 =
player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f;
player->draw = true;
@ -3243,7 +3243,7 @@ void Solar_LevelComplete(Player* player) {
player->pos.y = 200.0f;
player->pos.z = -(gPathProgress - 500.0f);
player->csState++;
player->wings.modelId = 1;
player->arwing.modelId = 1;
Audio_StartPlayerNoise(0);
@ -3278,7 +3278,7 @@ void Solar_LevelComplete(Player* player) {
gFillScreenAlphaStep = 4;
if (gMsgCharIsPrinting) {
player->wings.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f;
player->arwing.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f;
}
switch (gCsFrameCount) {

View File

@ -4763,7 +4763,7 @@ void Zoness_LevelComplete(Player* player) {
player->camRoll = 0.0f;
player->baseSpeed = 40.0f;
player->draw = true;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 =
player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 =
player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f;
gCsCamEyeX = player->cam.eye.x;
@ -4824,7 +4824,7 @@ void Zoness_LevelComplete(Player* player) {
Audio_KillSfxBySource(player->sfxSource);
gFillScreenAlpha = 250;
player->csTimer = 20;
player->wings.modelId = 1;
player->arwing.modelId = 1;
player->baseSpeed = 0.0f;
player->rot.x = 0.0f;
player->rot.y = 0.0f;

View File

@ -1461,7 +1461,7 @@ void Bolse_LevelComplete(Player* player) {
gCsFrameCount = 0;
gGroundHeight = -10000.0f;
player->hideShadow = true;
player->wings.modelId = 1;
player->arwing.modelId = 1;
AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0);
Audio_StartPlayerNoise(0);
}

View File

@ -673,16 +673,16 @@ void Fortuna_LevelComplete(Player* player) {
player->cam.eye.z += player->vel.z * 0.1f;
}
player->wings.unk_04 = 0.0f;
player->wings.unk_0C = 0.0f;
player->wings.unk_08 = 0.0f;
player->wings.unk_10 = 0.0f;
player->arwing.unk_04 = 0.0f;
player->arwing.unk_0C = 0.0f;
player->arwing.unk_08 = 0.0f;
player->arwing.unk_10 = 0.0f;
Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f);
switch (player->csState) {
case -1:
player->wings.modelId = 1;
player->arwing.modelId = 1;
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->wings.modelId = 1;
player->arwing.modelId = 1;
player->wingPosition = 1;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100);

View File

@ -1800,10 +1800,10 @@ void Katina_LevelComplete(Player* player) {
Vec3f dest;
f32 angle;
player->wings.unk_10 = 0.0f;
player->wings.unk_0C = 0.0f;
player->wings.unk_08 = 0.0f;
player->wings.unk_04 = 0.0f;
player->arwing.unk_10 = 0.0f;
player->arwing.unk_0C = 0.0f;
player->arwing.unk_08 = 0.0f;
player->arwing.unk_04 = 0.0f;
player->aerobaticPitch = 0.0f;

View File

@ -6515,13 +6515,13 @@ void Macbeth_LevelComplete2(Player* player) {
player->aerobaticPitch = 0.0f;
player->camRoll = 0.0f;
player->boostSpeed = 0.0f;
player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll =
player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll =
player->zRotBank = 0.0f;
player->yBob = 0.0f;
player->rockAngle = 0.0f;
player->unk_16C = 0.0f;
player->unk_170 = 0.0f;
player->wings.unk_04 = 0.0f;
player->arwing.unk_04 = 0.0f;
/* fallthrough */
case 1:
gShowBossHealth = false;
@ -6949,9 +6949,9 @@ void Macbeth_LevelComplete2(Player* player) {
player->savedAlternateView = player->pathChangeTimer = 0;
player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->pathChangeYaw =
player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 =
player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 =
player->unk_16C = player->rockAngle = player->yBob = player->wings.unk_0C =
player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll =
player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.unk_04 = player->unk_170 =
player->unk_16C = player->rockAngle = player->yBob = player->arwing.unk_0C =
player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll =
player->zRotBank = player->boostSpeed = 0.0f;
player->baseSpeed = 5.0f;

View File

@ -2594,15 +2594,15 @@ void Andross_AndAndross_Update(AndAndross* this) {
this->swork[8] = 0;
gControllerRumbleTimers[0] = 30;
if (player->wings.rightState == 2) {
if (player->arwing.rightState == 2) {
gRightWingHealth[0] = 0;
player->wings.rightState = 1;
player->arwing.rightState = 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, 8);
}
if (player->wings.leftState == 2) {
if (player->arwing.leftState == 2) {
gLeftWingHealth[0] = 0;
player->wings.leftState = 1;
player->arwing.leftState = 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);
}
@ -3857,12 +3857,12 @@ void Andross_80193C4C(Player* player) {
Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f);
player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = player->wings.unk_10 = 0.0f;
player->arwing.unk_04 = player->arwing.unk_08 = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f;
switch (player->csState) {
case 0:
gCsFrameCount = 0;
player->wings.modelId = 1;
player->arwing.modelId = 1;
D_ctx_80177A48[0] = 0.0f;
if (player->aerobaticPitch > 180.0f) {
player->aerobaticPitch -= 360.0f;

View File

@ -2087,7 +2087,7 @@ void SectorY_LevelComplete(Player* player) {
player->camRoll = 0.0f;
player->baseSpeed = 40.0f;
player->boostSpeed = 0.0f;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 =
player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 =
player->zRotBarrelRoll = player->zRotBank = 0.0f;
player->draw = true;
D_ctx_80177A48[8] = Math_RadToDeg(
@ -2193,13 +2193,13 @@ void SectorY_LevelComplete(Player* player) {
D_ctx_80177A48[7] = 25.0f;
D_ctx_80177A48[8] = 500.0f;
D_ctx_80177A48[9] = 3600.0f;
player->wings.modelId = 1;
player->arwing.modelId = 1;
}
break;
case 3:
if ((gCsFrameCount < 720) && gMsgCharIsPrinting) {
player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f;
player->arwing.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f;
}
gFillScreenAlphaTarget = 0;

View File

@ -124,8 +124,8 @@ void Venom2_UpdateEvents(ActorAllRange* this) {
D_ctx_80177C94 = gGoldRingCount[0];
D_ctx_80177C9C = player->shields + 1;
D_play_80161A5C = D_ctx_80177CA4 = gHitCount;
D_ctx_80177CAC = player->wings.rightState;
D_ctx_80177CB4 = player->wings.leftState;
D_ctx_80177CAC = player->arwing.rightState;
D_ctx_80177CB4 = player->arwing.leftState;
D_ctx_80177CBC = gRightWingHealth[0];
D_ctx_80177CC4 = gLeftWingHealth[0];
}
@ -302,10 +302,10 @@ void Venom2_LevelComplete(Player* player) {
sp70 = temp_fv1;
}
Math_SmoothStepToF(&player->wings.unk_04, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_08, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->wings.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_04, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_08, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f);
sp94 = player->pos.x - gBosses[0].obj.pos.x;
sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f);
sp8C = player->pos.z - gBosses[0].obj.pos.z;
@ -313,8 +313,8 @@ void Venom2_LevelComplete(Player* player) {
switch (player->csState) {
case 0:
player->csState++;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f;
player->wings.modelId = 1;
player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f;
player->arwing.modelId = 1;
D_ctx_80177A48[0] = 0.0f;
D_ctx_80177A48[1] = 0.1f;

View File

@ -2215,7 +2215,7 @@ void Map_801A0D14(void) {
void Map_801A116C(void) {
static f32 D_menu_801B6970 = 35.0f;
ArwingInfo wings;
ArwingInfo arwing;
Vec3f dest;
Vec3f src;
s32 colR = 30, colG = 9, colB = 5;
@ -2269,19 +2269,19 @@ void Map_801A116C(void) {
Matrix_SetGfxMtx(&gMasterDisp);
wings.rightState = wings.leftState = WINGSTATE_INTACT;
arwing.rightState = arwing.leftState = WINGSTATE_INTACT;
// clang-format off
wings.unk_18 = wings.unk_1C = wings.unk_20 = wings.unk_24 = wings.unk_04 =
wings.unk_08 = wings.unk_0C = wings.unk_10 = wings.unk_28 = 0.0f;
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;
// clang-format on
wings.unk_14 = 0.0f;
wings.modelId = 1;
wings.unk_30 = 0.0f;
wings.unk_34 = 0.0f;
wings.unk_38 = 0.0f;
arwing.unk_14 = 0.0f;
arwing.modelId = 1;
arwing.unk_30 = 0.0f;
arwing.unk_34 = 0.0f;
arwing.unk_38 = 0.0f;
Display_ArwingWings(&wings);
Display_ArwingWings(&arwing);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gGfxMatrix);

View File

@ -2232,7 +2232,7 @@ void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) {
}
void Title_8018D2B8(s32 arg0) {
ArwingInfo wings;
ArwingInfo arwing;
Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B,
gAmbientR, gAmbientG, gAmbientB);
@ -2253,17 +2253,17 @@ void Title_8018D2B8(s32 arg0) {
Matrix_SetGfxMtx(&gMasterDisp);
wings.rightState = wings.leftState = WINGSTATE_INTACT;
wings.unk_18 = wings.unk_1C = wings.unk_20 = wings.unk_24 = wings.unk_04 = wings.unk_08 = wings.unk_0C =
wings.unk_10 = wings.unk_28 = 0.0f;
arwing.rightState = arwing.leftState = 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;
wings.unk_14 = D_menu_801B84E8[arg0].unk_28;
wings.modelId = D_menu_801B84E8[arg0].unk_34;
wings.unk_30 = D_menu_801B84E8[arg0].unk_2C;
wings.unk_34 = D_menu_801B84E8[arg0].unk_30;
wings.unk_38 = D_menu_801B84E8[arg0].unk_24;
arwing.unk_14 = D_menu_801B84E8[arg0].unk_28;
arwing.modelId = D_menu_801B84E8[arg0].unk_34;
arwing.unk_30 = D_menu_801B84E8[arg0].unk_2C;
arwing.unk_34 = D_menu_801B84E8[arg0].unk_30;
arwing.unk_38 = D_menu_801B84E8[arg0].unk_24;
Display_ArwingWings(&wings);
Display_ArwingWings(&arwing);
Object_UpdateSfxSource(D_menu_801B84E8[arg0].unk_50);