summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-05-20 16:25:45 -0600
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2024-09-17 20:16:46 -0300
commit7c801d33d995869cbba2d0127919128489ae7d2a (patch)
treea7220a77f2fccbfada34a014731eef21853c7596 /src/engine
parent6248c70be1dd61b87ce9a5a9a65f3666f814a47c (diff)
Repo upstreamed
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/fox_360.c40
-rw-r--r--src/engine/fox_beam.c5
-rw-r--r--src/engine/fox_bg.c23
-rw-r--r--src/engine/fox_demo.c2
-rw-r--r--src/engine/fox_display.c23
-rw-r--r--src/engine/fox_edisplay.c14
-rw-r--r--src/engine/fox_enmy.c18
-rw-r--r--src/engine/fox_enmy2.c2
-rw-r--r--src/engine/fox_game.c6
-rw-r--r--src/engine/fox_hud.c7
-rw-r--r--src/engine/fox_load.c91
-rw-r--r--src/engine/fox_message.c2
-rw-r--r--src/engine/fox_play.c103
-rw-r--r--src/engine/fox_reset.c1
-rw-r--r--src/engine/fox_tank.c2
15 files changed, 49 insertions, 290 deletions
diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c
index 8f86dd96..e7e7b9dc 100644
--- a/src/engine/fox_360.c
+++ b/src/engine/fox_360.c
@@ -158,7 +158,6 @@ void AllRange_GreatFoxRepair(Player* player) {
} else {
gCsCamEyeZ = 480.0f;
}
-
player->rot.y = 0.0f;
player->pos.x = 2100.0f;
player->baseSpeed = 30.0f;
@@ -193,7 +192,6 @@ void AllRange_GreatFoxRepair(Player* player) {
player->pos.y = -420.0f;
player->pos.z = 0.0f;
player->rot.z = 0.0f;
-
gCsCamEyeX = -683.0f;
gCsCamEyeY = -346.0f;
gCsCamEyeZ = 305.0f;
@@ -396,7 +394,6 @@ void ActorAllRange_SpawnTeam(void) {
actor->obj.pos.y = sTeamSpawnPos[i].y;
actor->obj.pos.z = sTeamSpawnPos[i].z;
actor->aiType = sTeamAi[i];
-
if (gCurrentLevel == LEVEL_KATINA) {
actor->aiIndex = sTeamSpawnTargetsKA[i];
} else {
@@ -528,7 +525,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y;
gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z;
}
-
if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) {
gAllRangeFrameCount++;
for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) {
@@ -538,12 +534,10 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
gActors[actor->aiIndex].iwork[2] = AI360_FOX;
gActors[actor->aiIndex].state = STATE360_2;
gActors[actor->aiIndex].aiIndex = actor->aiType;
-
if (gTeamHelpActor == &gActors[actor->aiIndex]) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
}
-
if (gActors[actor->aiIndex].iwork[3] == 0) {
switch (gActors[actor->aiIndex].aiType) {
case AI360_FALCO:
@@ -559,7 +553,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
gActors[actor->aiIndex].iwork[3] = 200;
}
}
-
if (actor->aiType == AI360_WOLF) {
if (gCurrentLevel != LEVEL_VENOM_2) {
actor->state = STATE360_3;
@@ -571,7 +564,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
}
}
}
-
if (gTeamShields[TEAM_ID_FALCO] <= 0) {
gActors[AI360_LEON].aiIndex = AI360_FOX;
}
@@ -629,7 +621,6 @@ void ActorAllRange_UpdateEnemyEvents(Actor* this) {
return;
}
}
-
if (gTeamShields[enemy->aiIndex] > 0) {
ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]);
if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) &&
@@ -707,7 +698,6 @@ void ActorAllRange_SpawnSupplies(Actor* this) {
}
}
}
-
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeSuppliesSent) {
if (gAllRangeWingRepairTimer != 0) {
gAllRangeWingRepairTimer--;
@@ -879,12 +869,10 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
if (this->aiType == AI360_GREAT_FOX) {
this->dmgType = DMG_NONE;
}
-
if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) {
this->damage = 10;
this->timer_0C2 = 10;
}
-
if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) &&
(this->dmgType == DMG_EXPLOSION)) {
this->dmgType = DMG_NONE;
@@ -911,7 +899,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
this->dmgSource = 0;
}
}
-
if (this->aiType >= AI360_WOLF) {
if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) &&
!((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) {
@@ -954,7 +941,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
}
return;
}
-
this->timer_0C6 = 50;
this->iwork[8] = 20;
this->obj.status = OBJ_DYING;
@@ -1008,7 +994,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
}
gKaAllyKillCount++;
}
-
switch (this->aiType) {
case AI360_WOLF:
gStarWolfTeamAlive[0] = 0;
@@ -1067,7 +1052,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
}
}
break;
-
case AI360_FALCO + NPC_SHOT_ID + 1:
case AI360_SLIPPY + NPC_SHOT_ID + 1:
case AI360_PEPPY + NPC_SHOT_ID + 1:
@@ -1230,7 +1214,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
} else {
Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY);
}
-
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
gTeamHelpActor = this;
gTeamHelpTimer = 320;
@@ -1317,7 +1300,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
ActorAllRange_UpdateEvents(this);
return;
}
-
if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) {
switch (RAND_INT(3.9f)) {
case 0:
@@ -1358,7 +1340,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
this->work_046 = 0;
break;
-
case STATE360_9:
this->timer_0BC = RAND_INT(20.0f) + 30;
if (Rand_ZeroOne() < 0.5f) {
@@ -1373,7 +1354,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[19] += 360.0f;
}
break;
-
case STATE360_10:
this->timer_0BC = 35;
if (Rand_ZeroOne() < 0.5f) {
@@ -1389,7 +1369,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
break;
}
}
-
this->iwork[16] = STATE360_0;
spCC = spC8 = spC4 = 0.0f;
@@ -1461,7 +1440,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
sp104 = 0;
this->iwork[5] = 0;
-
if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) &&
(this->state != STATE360_6)) {
this->state = STATE360_6;
@@ -1517,7 +1495,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
sp104 = 2;
break;
-
case STATE360_5:
SectorZ_Missile_Update(this);
sp104 = 1;
@@ -1551,7 +1528,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.03f, 0.5f, 0.0f);
}
break;
-
case STATE360_1:
this->fwork[1] = 40.0f;
@@ -1566,7 +1542,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
break;
-
case STATE360_2:
sp104 = 1;
spF8 = 800.0f;
@@ -1618,14 +1593,12 @@ void ActorAllRange_Update(ActorAllRange* this) {
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f;
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
}
-
if (!gPlayer[0].somersault) {
this->fwork[4] = gPlayer[0].pos.x + spCC;
this->fwork[5] = gPlayer[0].pos.y + spC8;
this->fwork[6] = gPlayer[0].trueZpos + spC4;
this->fwork[1] = gPlayer[0].baseSpeed + 10.0f;
}
-
if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) {
this->fwork[3] = 3.0f;
this->fwork[1] = gPlayer[0].baseSpeed - 5.0f;
@@ -1676,7 +1649,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[6] = gBosses[0].obj.pos.z;
this->fwork[1] = 40.0f;
}
-
if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) {
if (spE8 < spF8) {
if (spEC < spF8) {
@@ -1899,7 +1871,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
} else {
this->iwork[4] = 0;
}
-
if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) ||
(gActors[this->aiIndex].state == STATE360_6) ||
(gActors[this->aiIndex].obj.status == OBJ_FREE))) {
@@ -1911,7 +1882,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
break;
-
case STATE360_3:
sp104 = 1;
if (this->timer_0BC == 0) {
@@ -1932,7 +1902,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[3] = 1.0f;
this->fwork[1] = 38.0f;
}
-
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) {
this->fwork[10] = 30.0f;
}
@@ -1991,7 +1960,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
break;
-
case STATE360_7:
this->fwork[1] = 40.0f;
Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f);
@@ -2000,7 +1968,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->state = STATE360_3;
}
break;
-
case STATE360_8:
this->fwork[1] = 40.0f;
if ((this->index % 2) != 0) {
@@ -2034,7 +2001,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
break;
}
break;
-
case STATE360_9:
this->fwork[1] = 40.0f;
if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) {
@@ -2047,7 +2013,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->state = STATE360_3;
}
break;
-
case STATE360_10:
sp104 = 1;
if (this->timer_0BC == 0) {
@@ -2069,7 +2034,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
if (gCurrentLevel == LEVEL_VENOM_2) {
var_v0 = 2 - 1;
}
-
if (((this->index + gGameFrameCount) & var_v0) == 0) {
this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC));
this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(spDC))));
@@ -2156,7 +2120,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y;
-
Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f);
Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f);
@@ -2177,7 +2140,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[13] -= (this->fwork[13] * 0.1f);
this->fwork[14] -= (this->fwork[14] * 0.1f);
this->fwork[12] -= (this->fwork[12] * 0.1f);
-
if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) {
this->obj.pos.y = gGroundHeight + 40.0f;
this->vel.y = 0.0f;
@@ -2238,7 +2200,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
radarMark->pos.y = this->obj.pos.y;
radarMark->pos.z = this->obj.pos.z;
radarMark->yRot = this->rot_0F4.y + 180.0f;
-
if (this->iwork[1] != 0) {
this->iwork[1]--;
if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) {
@@ -2272,7 +2233,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
sp90.x = this->vel.x;
sp90.y = this->vel.y;
sp90.z = this->vel.z;
-
temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3);
if (temp_v0_27 != 0) {
this->obj.pos.x -= this->vel.x;
diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c
index 5d79a369..0ba4696a 100644
--- a/src/engine/fox_beam.c
+++ b/src/engine/fox_beam.c
@@ -2276,14 +2276,12 @@ void PlayerShot_Update(PlayerShot* shot) {
switch (shot->obj.status) {
case SHOT_FREE:
break;
-
case SHOT_ACTIVE:
ticks = 1;
switch (shot->obj.id) {
case PLAYERSHOT_GFOX_LASER:
ticks = 4;
break;
-
case PLAYERSHOT_SINGLE_LASER:
case PLAYERSHOT_TWIN_LASER:
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
@@ -2292,12 +2290,10 @@ void PlayerShot_Update(PlayerShot* shot) {
ticks = 3;
}
break;
-
case PLAYERSHOT_TANK:
ticks = 2;
break;
}
-
for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) {
if (shot->timer > 0) {
shot->timer--;
@@ -2308,7 +2304,6 @@ void PlayerShot_Update(PlayerShot* shot) {
PlayerShot_UpdateShot(shot, i);
}
break;
-
case SHOT_HITMARK:
PlayerShot_UpdateHitmark(shot);
break;
diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c
index 4b623be9..3ca59718 100644
--- a/src/engine/fox_bg.c
+++ b/src/engine/fox_bg.c
@@ -283,7 +283,6 @@ void Background_DrawBackdrop(void) {
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
-
if (gCurrentLevel == LEVEL_FORTUNA) {
Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY);
} else if (gCurrentLevel == LEVEL_KATINA) {
@@ -352,7 +351,6 @@ void Background_DrawBackdrop(void) {
gSPDisplayList(gMasterDisp++, D_VE1_60046F0);
break;
}
-
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -438,7 +436,6 @@ void Background_DrawBackdrop(void) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
-
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
gSPDisplayList(gMasterDisp++, D_AQ_601AFF0);
} else {
@@ -469,7 +466,6 @@ void Background_DrawBackdrop(void) {
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114;
sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f);
sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f
-
if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
(gPlayer[0].csState < 3)) {
D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f;
@@ -485,7 +481,6 @@ void Background_DrawBackdrop(void) {
RCP_SetupDL_17();
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
-
if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) {
Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY);
} else if (gCurrentLevel == LEVEL_SOLAR) {
@@ -682,7 +677,6 @@ void Background_DrawBackdrop(void) {
}
Matrix_Pop(&gGfxMatrix);
}
-
if (gStarWarpDistortion > 0.0f) {
f32* xStar = gStarOffsetsX;
f32* yStar = gStarOffsetsY;
@@ -690,7 +684,6 @@ void Background_DrawBackdrop(void) {
RCP_SetupDL_14();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255);
-
zRot = 0.0f;
for (i = 0; i < 300; i++, xStar++, yStar++) {
*xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
@@ -725,12 +718,10 @@ void Background_DrawSun(void) {
(gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) {
return;
}
-
gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType];
if (gPlayerGlareAlphas[gPlayerNum] > 300) {
gPlayerGlareAlphas[gPlayerNum] = 0;
}
-
if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) ||
(((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) ||
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
@@ -738,7 +729,6 @@ void Background_DrawSun(void) {
gPlayerGlareReds[gPlayerNum] = 128;
gPlayerGlareGreens[gPlayerNum] = 128;
gPlayerGlareBlues[gPlayerNum] = 128;
-
camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw);
camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch);
if (camPitch > 180.0f) {
@@ -756,7 +746,6 @@ void Background_DrawSun(void) {
gSunViewY -= 60.0f;
gSunViewX -= 480.0f;
}
-
if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) {
gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2;
if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) {
@@ -764,7 +753,6 @@ void Background_DrawSun(void) {
}
}
}
-
if (gPlayerGlareAlphas[gPlayerNum] != 0) {
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
@@ -774,14 +762,12 @@ void Background_DrawSun(void) {
sunAlpha = sSunAlphas;
sunDL = sSunDLs;
sunScale = sSunScales;
-
if (gCurrentLevel == LEVEL_KATINA) {
sunColor = sKaSunColors;
sunAlpha = sKaSunAlphas;
sunDL = sKaSunDLs;
sunScale = sKaSunScales;
}
-
for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY);
@@ -810,13 +796,11 @@ void Background_DrawLensFlare(void) {
(gPlayerGlareAlphas[gPlayerNum] == 0)) {
return;
}
-
alphaMod = 1.0f;
if (gPlayerGlareAlphas[gPlayerNum] < 80) {
alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f;
}
alphaMod *= sLensFlareAlphaMod[gLevelType];
-
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY);
@@ -828,7 +812,6 @@ void Background_DrawLensFlare(void) {
lensFlareDL = &sSunDLs[5];
lensFlareScale = &sSunScales[5];
lensFlareShift = &sSunShifts[5];
-
if (gCurrentLevel == LEVEL_KATINA) {
lensFlareColor = &sKaSunColors[5];
lensFlareAlpha = &sKaSunAlphas[5];
@@ -836,7 +819,6 @@ void Background_DrawLensFlare(void) {
lensFlareScale = &sKaSunScales[5];
lensFlareShift = &sKaSunShifts[5];
}
-
for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f,
@@ -1067,7 +1049,6 @@ void Background_DrawGround(void) {
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
sp1C0 = D_AQ_600AB10;
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
-
if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) {
gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32,
@@ -1091,7 +1072,6 @@ void Background_DrawGround(void) {
gSPDisplayList(gMasterDisp++, sp1C0);
Matrix_Pop(&gGfxMatrix);
}
-
if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) {
gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32,
32);
@@ -1105,7 +1085,6 @@ void Background_DrawGround(void) {
} else {
RCP_SetupDL(&gMasterDisp, SETUPDL_37);
}
-
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
@@ -1137,7 +1116,6 @@ void Background_DrawGround(void) {
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
-
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
@@ -1161,7 +1139,6 @@ void Background_DrawGround(void) {
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
-
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c
index 5e40b643..1b8e6f33 100644
--- a/src/engine/fox_demo.c
+++ b/src/engine/fox_demo.c
@@ -1938,7 +1938,6 @@ void func_demo_8004E4D4(ActorCutscene* this) {
if (this->fwork[9] > 50.0f) {
this->fwork[9] = 50.0f;
}
-
if (this->timer_0BE == 0) {
switch (this->index) {
case 1:
@@ -2920,7 +2919,6 @@ void Cutscene_DrawGreatFox(void) {
((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) {
RCP_SetupDL_49();
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
-
for (i = 0, var_s6_2 = D_demo_800CA0BC; i < ARRAY_COUNT(sp9C); i++, var_s6_2++) {
if ((i != 1) || gGreatFoxIntact) {
sp9C[i] = 0.0f;
diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c
index a1cf1c50..ca4ec967 100644
--- a/src/engine/fox_display.c
+++ b/src/engine/fox_display.c
@@ -35,13 +35,11 @@ void Display_DrawHelpAlert(void) {
if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) {
return;
}
-
if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
return;
}
-
if (gTeamHelpTimer != 0) {
gTeamHelpTimer--;
if (gTeamHelpTimer == 0) {
@@ -262,7 +260,6 @@ void Display_OnFootCharacter(Player* player) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY);
-
switch (player->num) {
case 0:
Animation_DrawSkeleton(5, aVsOnFootFoxSkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw,
@@ -303,7 +300,6 @@ void Display_Landmaster(Player* player) {
Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY);
-
if (gPlayerNum == player->num) {
sp64 = 0.0f;
if (gChargeTimers[player->num] >= 20) {
@@ -343,7 +339,6 @@ f32 sPlayerShadowing = 0.0f;
void Display_LandmasterMuzzleFlash(Player* player) {
Matrix_Push(&gGfxMatrix);
-
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) {
Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y,
D_display_80161548[player->num].z, MTXF_APPLY);
@@ -718,7 +713,6 @@ void Display_Reticle(Player* player) {
translate = &D_display_801613E0[i];
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY);
-
if (gChargeTimers[player->num] >= 20) {
RCP_SetupDL(&gMasterDisp, SETUPDL_63);
if (i == 1) {
@@ -844,7 +838,6 @@ void Display_LandmasterEngineGlow_Draw(Player* player) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, player->bankAngle * M_DTOR, MTXF_APPLY);
-
if (player->form == FORM_LANDMASTER) {
if (player->unk_194 <= 0.0f) {
Matrix_Pop(&gGfxMatrix);
@@ -904,7 +897,6 @@ void Display_BarrelRollShield(Player* player) {
} else {
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
}
-
if (player->baseRollRate < 0) {
Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY);
}
@@ -948,7 +940,6 @@ void Display_ArwingLaserCharge(Player* player) {
if (gChargeTimers[player->num] > 10) {
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
-
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
@@ -968,7 +959,6 @@ void Display_ArwingLaserCharge(Player* player) {
} else {
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
}
-
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
@@ -1014,7 +1004,6 @@ void Display_ArwingLaserCharge(Player* player) {
gSPDisplayList(gMasterDisp++, aOrbDL);
Matrix_Pop(&gGfxMatrix);
}
-
if (gMuzzleFlashScale[player->num] > 0.1f) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
@@ -1029,7 +1018,6 @@ void Display_ArwingLaserCharge(Player* player) {
case LASERS_SINGLE:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128);
gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128);
-
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
@@ -1037,7 +1025,6 @@ void Display_ArwingLaserCharge(Player* player) {
}
Matrix_Push(&gGfxMatrix);
-
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f,
MTXF_APPLY);
@@ -1160,7 +1147,6 @@ void Display_PlayerFeatures(Player* player) {
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR),
MTXF_APPLY);
Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY);
-
var_fv0 = player->unk_194 * 30.0f;
if (var_fv0 > 30.0f) {
var_fv0 = 30.0f;
@@ -1213,7 +1199,6 @@ void Display_ArwingWingTrail_Draw(Player* player) {
sp5C = 108.0f;
sp58 = -22.0f;
}
-
if (player->contrailScale != 0.0f) {
sp54 = 0.0f;
if ((gGameFrameCount % 2) != 0) {
@@ -1588,7 +1573,6 @@ void Display_LockOnIndicator(void) {
}
}
}
-
for (j = 0; j < gCamCount; j++) {
gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f;
gLockOnTargetViewPos[j].z = 100.0f;
@@ -1644,7 +1628,6 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
if (sp38 < 0.0f) {
sp38 += 360.0f;
}
-
sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->rot.y;
if (sp3C > 360.0f) {
sp3C -= 360.0f;
@@ -1692,13 +1675,11 @@ void Display_Update(void) {
}
Matrix_Push(&gGfxMatrix);
-
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f);
} else {
Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f);
}
-
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
@@ -1745,7 +1726,6 @@ void Display_Update(void) {
gPlayCamAt.y = camPlayer->cam.at.y;
gPlayCamAt.z = camPlayer->cam.at.z;
}
-
camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z);
camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y,
sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x)));
@@ -1756,7 +1736,6 @@ void Display_Update(void) {
tempVec.y = 100.0f;
tempVec.z = 0.0f;
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
-
if (gStarCount != 0) {
gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll);
Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z);
@@ -1816,7 +1795,6 @@ void Display_Update(void) {
TexturedLine_Draw();
gReflectY = 1;
PlayerShot_DrawAll();
-
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
@@ -1842,7 +1820,6 @@ void Display_Update(void) {
if (gCurrentLevel == LEVEL_AQUAS) {
Effect_Draw(0);
}
-
if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) {
D_bg_8015F964 = true;
Effect_Draw(1);
diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c
index 7534ccfd..04d3ee45 100644
--- a/src/engine/fox_edisplay.c
+++ b/src/engine/fox_edisplay.c
@@ -684,7 +684,6 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
}
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
break;
-
case OBJ_ACTOR_CUTSCENE:
case OBJ_ACTOR_TEAM_BOSS:
case OBJ_ACTOR_EVENT:
@@ -739,7 +738,6 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
case OBJ_BOSS_CO_CARRIER_UPPER:
case OBJ_BOSS_CO_CARRIER_BOTTOM:
COS_DEG(gBosses[index].obj.rot.z);
-
if (gGroundSurface == SURFACE_WATER) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
} else {
@@ -1103,7 +1101,6 @@ void Actor_DrawOnRails(Actor* this) {
Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]);
}
}
-
if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) {
sp34.y += this->info.targetOffset;
Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]);
@@ -1124,7 +1121,6 @@ void Actor_DrawAllRange(Actor* this) {
f32 var_fv1;
sDrewActor = false;
-
if (this->info.drawType == 2) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW);
@@ -1139,7 +1135,6 @@ void Actor_DrawAllRange(Actor* this) {
var_fv0 = 1000.0f;
var_fv1 = -25000.0f;
}
-
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
@@ -1172,7 +1167,6 @@ void Actor_DrawAllRange(Actor* this) {
var_fv1 = -20000.0f;
var_fa1 = 0.5f;
}
-
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
@@ -1212,7 +1206,6 @@ void Actor_DrawAllRange(Actor* this) {
}
}
}
-
Object_SetSfxSourceToView(this->sfxSource, &sViewPos);
this->iwork[24] = sDrewActor;
}
@@ -1444,7 +1437,6 @@ void Object_DrawShadow(s32 index, Object* obj) {
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + gPathProgress, MTXF_APPLY);
break;
}
-
if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) ||
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY);
@@ -1598,7 +1590,6 @@ void Display_SetSecondLight(Vec3f* pos) {
sp9C.x = pos->x - gLight3x;
sp9C.y = pos->y - gLight3y;
sp9C.z = pos->z - gLight3z;
-
lightDist = VEC3F_MAG(&sp9C);
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
lightFade = 700.0f / lightDist;
@@ -1622,7 +1613,6 @@ void Display_SetSecondLight(Vec3f* pos) {
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY);
-
sp6C.x = 0.0f;
sp6C.y = 0.0f;
sp6C.z = -100.0f;
@@ -1698,7 +1688,6 @@ void Object_DrawAll(s32 arg0) {
}
} else {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
-
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
if (scenery->obj.status >= OBJ_ACTIVE) {
if (arg0 > 0) {
@@ -1720,7 +1709,6 @@ void Object_DrawAll(s32 arg0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
}
-
Object_SetCullDirection(arg0);
Matrix_Push(&gGfxMatrix);
Boss_Draw(boss, arg0);
@@ -1773,7 +1761,6 @@ void Object_DrawAll(s32 arg0) {
case LEVELMODE_ON_RAILS:
case LEVELMODE_TURRET:
Matrix_Push(&gGfxMatrix);
-
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) {
Display_SetSecondLight(&actor->obj.pos);
@@ -1874,7 +1861,6 @@ void Effect_DrawAll(s32 arg0) {
void Object_Draw(s32 arg0) {
gReflectY = 1;
Object_DrawAll(1);
-
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
gReflectY = -1;
Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c
index 6224403a..c33d7faf 100644
--- a/src/engine/fox_enmy.c
+++ b/src/engine/fox_enmy.c
@@ -562,7 +562,6 @@ void Object_LoadLevelObjects(void) {
} else {
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
}
-
if (gGroundClipMode == 0) {
for (j = 0; j < gDrawSmallRocks; j++) {
if (gCurrentLevel == LEVEL_AQUAS) {
@@ -697,7 +696,6 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x
for (i = 0; i < count; i++, hitboxData += 6) {
rotate = 0.0f;
hitRot.x = hitRot.y = hitRot.z = 0.0f;
-
if (*hitboxData >= HITBOX_SHADOW) {
return false;
}
@@ -2003,7 +2001,6 @@ void Item_CheckBounds(Item* this) {
Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath - var_fa1, 0.1f, 10.0f, 0.01f);
}
}
-
if (this->obj.pos.y > 650.0f) {
Math_SmoothStepToF(&this->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f);
}
@@ -2018,7 +2015,6 @@ void Item_CheckBounds(Item* this) {
} else if (this->obj.pos.y < -500.0f) {
Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f);
}
-
if (gVersusMode && (this->index == 0) && (gItems[1].obj.status == OBJ_ACTIVE)) {
if (fabsf(this->obj.pos.x - gItems[1].obj.pos.x) < 200.0f) {
if (fabsf(this->obj.pos.z - gItems[1].obj.pos.z) < 200.0f) {
@@ -2103,7 +2099,6 @@ void ActorSupplies_Update(ActorSupplies* this) {
Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f);
}
}
-
if (this->dmgType != DMG_NONE) {
this->dmgType = DMG_NONE;
this->health -= this->damage;
@@ -2184,7 +2179,6 @@ void func_enmy_80067A40(void) {
void Item1up_Update(Item1UP* this) {
Item_CheckBounds(this);
Item_SpinPickup(this);
-
if (this->collected) {
Object_Kill(&this->obj, this->sfxSource);
Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum);
@@ -2201,7 +2195,6 @@ void Item1up_Update(Item1UP* this) {
void ItemPickup_Update(Item* this) {
Item_CheckBounds(this);
Item_SpinPickup(this);
-
if (this->state == 0) {
switch (this->obj.id) {
case OBJ_ITEM_BOMB:
@@ -2219,7 +2212,6 @@ void ItemPickup_Update(Item* this) {
case OBJ_ITEM_LASERS:
this->width = 18.0f;
-
if (this->collected) {
this->timer_4A = 50;
this->state = 1;
@@ -2238,7 +2230,6 @@ void ItemPickup_Update(Item* this) {
} else {
gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60;
}
-
gRightWingFlashTimer[this->playerNum] = 1030;
gLeftWingFlashTimer[this->playerNum] = 1030;
}
@@ -2246,7 +2237,6 @@ void ItemPickup_Update(Item* this) {
}
} else {
Math_SmoothStepToF(&this->width, 2.5f, 1.0f, 0.5f, 0.0f);
-
this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f;
if (gPlayer[this->playerNum].form == FORM_LANDMASTER) {
@@ -2284,7 +2274,6 @@ void ItemSupplyRing_Update(Item* this) {
Math_SmoothStepToF(&this->width, 0.4f, 1.0f, 0.05f, 0.0f);
Item_CheckBounds(this);
Item_SpinPickup(this);
-
if (this->collected) {
this->state = 1;
this->timer_48 = 50;
@@ -2332,7 +2321,6 @@ void ItemSupplyRing_Update(Item* this) {
} else {
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f;
}
-
if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f;
} else {
@@ -2340,7 +2328,6 @@ void ItemSupplyRing_Update(Item* this) {
}
this->obj.rot.z += 22.0f;
-
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f,
0.0f);
if (this->timer_48 == 0) {
@@ -2372,7 +2359,6 @@ void ItemGoldRing_Update(ItemGoldRing* this) {
void ItemWingRepair_Update(ItemWingRepair* this) {
Item_CheckBounds(this);
Item_SpinPickup(this);
-
if (this->collected) {
func_enmy_80067A40();
Object_Kill(&this->obj, this->sfxSource);
@@ -2385,7 +2371,6 @@ void ItemWingRepair_Update(ItemWingRepair* this) {
void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
Item_CheckBounds(this);
-
if (this->state > 0) {
if (this->state == 1) {
this->obj.rot.z -= 10.0f;
@@ -2404,7 +2389,6 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
}
} else {
this->width = 100.0f;
-
if (gRingPassCount < 0) {
this->state = 2;
this->unk_44 = 255;
@@ -2491,7 +2475,6 @@ void ItemRingCheck_Update(Item* this) {
void ItemPathChange_Update(Item* this) {
gLastPathChange = this->obj.id;
-
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
Object_Kill(&this->obj, this->sfxSource);
} else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) {
@@ -3032,7 +3015,6 @@ void TexturedLine_Update(TexturedLine* this) {
}
}
}
-
if (((this->posAA.z + gPathProgress) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) {
this->mode = 0;
}
diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c
index 6cebf24d..3078d292 100644
--- a/src/engine/fox_enmy2.c
+++ b/src/engine/fox_enmy2.c
@@ -153,7 +153,6 @@ void MeHopBot_Update(MeHopBot* this) {
this->obj.rot.y = Math_RadToDeg(
Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].trueZpos - this->obj.pos.z));
-
if (this->obj.pos.y < -500.0f) {
this->obj.pos.y = -500.0f;
this->vel.y = 0.0f;
@@ -457,7 +456,6 @@ void CoMoleMissile_Update(CoMoleMissile* this) {
if (this->vel.y < 12.0f) {
Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f);
}
-
if (this->obj.pos.y < (gGroundHeight + 10.0f)) {
this->obj.pos.y = gGroundHeight;
this->state = 4;
diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c
index 22ad8f87..5c55069d 100644
--- a/src/engine/fox_game.c
+++ b/src/engine/fox_game.c
@@ -114,7 +114,6 @@ void Game_SetGameState(void) {
gSceneSetup = 0;
gFillScreenColor = gBgColor = 0;
gPathProgress = 0.0f;
-
if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) {
gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
@@ -343,7 +342,6 @@ void Game_Update(void) {
u8 soundMode;
Game_SetGameState();
-
if (gGameStandby) {
Game_InitStandbyDL(&gUnkDisp1);
gGameStandby = false;
@@ -440,14 +438,12 @@ void Game_Update(void) {
gVersusStage = 0;
gVsPointsToWin = 3;
gBlurAlpha = 255;
-
for (i = 0; i < ARRAY_COUNT(gLeveLClearStatus); i++) {
gLeveLClearStatus[i] = 0;
}
gExpertMode = false;
gOptionSoundMode = gSaveFile.save.data.soundMode;
-
switch (gOptionSoundMode) {
case OPTIONSOUND_STEREO:
soundMode = SOUNDMODE_STEREO;
@@ -463,12 +459,10 @@ void Game_Update(void) {
soundMode = SOUNDMODE_STEREO;
break;
}
-
SEQCMD_SET_SOUND_MODE(soundMode);
gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume;
gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume;
gVolumeSettings[AUDIO_TYPE_SFX] = gSaveFile.save.data.sfxVolume;
-
if (gVolumeSettings[AUDIO_TYPE_MUSIC] > 99) {
gVolumeSettings[AUDIO_TYPE_MUSIC] = 99;
}
diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c
index 0102cc59..8c5d1f8f 100644
--- a/src/engine/fox_hud.c
+++ b/src/engine/fox_hud.c
@@ -184,7 +184,6 @@ void HUD_TeamDownWrench_Draw(s32 arg0) {
};
RCP_SetupDL(&gMasterDisp, SETUPDL_36);
-
if (arg0 == 0) {
for (i = 1; i < 4; i++) {
if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
@@ -2947,7 +2946,6 @@ void HUD_BoostGauge_Draw(f32 xPos, f32 yPos) {
HUD_BoostGaugeOverheat_Draw(boostGaugeXpos[playerNum] + temp + 1.0f, boostGaugeYpos[playerNum] + sp60, temp_fs0,
1.0f);
}
-
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
HUD_BoostGaugeFrame_Draw(boostGaugeXpos[playerNum], boostGaugeYpos[playerNum], 1.0f, 1.0f);
@@ -3098,8 +3096,8 @@ void HUD_DrawBossHealth(void) {
}
if (D_801616C4 >= 0.88f) {
- temp6 = sp3C + 9.0f;
- temp7 = 101.0f - (31.884058f * D_801616C8) + temp1;
+ temp6 = sp3C + 8.0f;
+ temp7 = 101.0f - ((2200.0f / 69.0f) * D_801616C8) + temp1;
if (D_801616C8 > 0.0f) {
Lib_TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8);
}
@@ -3277,7 +3275,6 @@ void HUD_Hitpoints_Update(f32 xPos, f32 yPos) {
b = 200;
}
}
-
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255);
HUD_Hitpoints_Draw(xPos, yPos);
diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c
index b00a6280..0e3ea571 100644
--- a/src/engine/fox_load.c
+++ b/src/engine/fox_load.c
@@ -26,61 +26,62 @@ Scene sCurrentScene = {
void Load_RomFile(void* vRomAddress, void* dest, ptrdiff_t size) {
s32 i;
+
Lib_FillScreen(true);
sFillTimer = 3;
gGameStandby = true;
}
u8 Load_SceneFiles(Scene* scene) {
-
sCurrentScene = *scene;
return true;
+#else
+ u8* ramPtr = SEGMENT_VRAM_START(ovl_i1);
+ u8 segment;
+ u8 changeScene = false;
- // u8* ramPtr = SEGMENT_VRAM_START(ovl_i1);
- // u8 segment;
- // u8 changeOvl = false;
-
- // if (ovlInit->ovl.rom.start == (0, sCurrentOverlay.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array
- // ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom);
- // ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss);
- // } else {
- // sCurrentOverlay.ovl.rom.start = ovlInit->ovl.rom.start;
- // sCurrentOverlay.ovl.rom.end = ramPtr;
- // if (ovlInit->ovl.rom.start != 0) {
- // changeOvl = true;
- // Overlay_LoadSegment(ovlInit->ovl.rom.start, ramPtr, SEGMENT_SIZE(ovlInit->ovl.rom));
- // ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom);
- // bzero(ovlInit->ovl.bss.start, SEGMENT_SIZE(ovlInit->ovl.bss));
- // ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss);
- // }
- // }
- // segment = 0;
- // while ((segment < 15) && (ovlInit->assets[segment].start == sCurrentOverlay.assets[segment].start) &&
- // changeOvl == 0) {
- // if (ovlInit->assets[segment].start != 0) {
- // gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
- // gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
- // ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]);
- // }
- // segment += 1;
- // }
- // for (segment; segment < 15; segment += 1) {
- // sCurrentOverlay.assets[segment].start = ovlInit->assets[segment].start;
- // sCurrentOverlay.assets[segment].end = ramPtr;
- // if (ovlInit->assets[segment].start != 0) {
- // gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
- // gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
- // Overlay_LoadSegment(ovlInit->assets[segment].start, ramPtr, SEGMENT_SIZE(ovlInit->assets[segment]));
- // ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]);
- // }
- // }
+ if (scene->ovl.rom.start == (0, sCurrentScene.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array
+ ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom);
+ ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss);
+ } else {
+ sCurrentScene.ovl.rom.start = scene->ovl.rom.start;
+ sCurrentScene.ovl.rom.end = ramPtr;
+ if (scene->ovl.rom.start != 0) {
+ changeScene = true;
+ Load_RomFile(scene->ovl.rom.start, ramPtr, SEGMENT_SIZE(scene->ovl.rom));
+ ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom);
+ bzero(scene->ovl.bss.start, SEGMENT_SIZE(scene->ovl.bss));
+ ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss);
+ }
+ }
+ segment = 0;
+ while ((segment < 15) && (scene->assets[segment].start == sCurrentScene.assets[segment].start) &&
+ (changeScene == false)) {
+ if (scene->assets[segment].start != 0) {
+ gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
+ gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
+ ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]);
+ }
+ segment += 1; // can't be ++
+ }
+ for (segment; segment < 15; segment += 1) {
+ sCurrentScene.assets[segment].start = scene->assets[segment].start;
+ sCurrentScene.assets[segment].end = ramPtr;
+ if (scene->assets[segment].start != 0) {
+ gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
+ gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
+ Load_RomFile(scene->assets[segment].start, ramPtr, SEGMENT_SIZE(scene->assets[segment]));
+ ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]);
+ }
+ }
- // if (sFillTimer != 0) {
- // sFillTimer--;
- // } else if (gStartNMI == 0) {
- // Lib_FillScreen(false);
- // }
- // return changeOvl;
+ if (sFillTimer != 0) {
+ sFillTimer--;
+ } else if (gStartNMI == 0) {
+ Lib_FillScreen(false);
+ }
+ return changeScene;
+#endif
}
u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) {
diff --git a/src/engine/fox_message.c b/src/engine/fox_message.c
index 83482dfe..d2a8b1db 100644
--- a/src/engine/fox_message.c
+++ b/src/engine/fox_message.c
@@ -68,8 +68,8 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len)
s32 yChar = yPos;
s32 i;
bool print;
- msgPtr = LOAD_ASSET(msgPtr);
+ msgPtr = LOAD_ASSET(msgPtr);
gDPSetPrimColor((*gfxPtr)++, 0x00, 0x00, 255, 255, 255, 255);
gDPSetTextureLUT((*gfxPtr)++, G_TT_RGBA16);
gDPLoadTLUT((*gfxPtr)++, 64, 256, gTextCharPalettes);
diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c
index 04609189..c38ef870 100644
--- a/src/engine/fox_play.c
+++ b/src/engine/fox_play.c
@@ -86,7 +86,6 @@ void Play_UpdateDynaFloor(void) {
f32 sp84;
gDynaFloorTimer++;
-
switch (gCurrentLevel) {
case LEVEL_SOLAR:
if ((gGameFrameCount % 2) != 0) {
@@ -126,7 +125,6 @@ void Play_UpdateDynaFloor(void) {
for (i = 0; i < 17 * 17; i++, var_s3++, var_s5++, var_s4++, var_s0++, var_s1++, spB0++) {
Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f);
Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f);
-
if ((gDynaFloorTimer & spA8) == (i & spA8)) {
*var_s5 = RAND_FLOAT(sp90);
*var_s4 = 0.0f;
@@ -219,7 +217,6 @@ void Player_DamageEffects(Player* player) {
if (player->shields > 48) {
var_v1 = 64 - 1;
}
-
if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
sp40 = 0.0f;
if (player->form == FORM_LANDMASTER) {
@@ -569,7 +566,6 @@ void Play_GenerateStarfield(void) {
MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000);
MEM_ARRAY_ALLOCATE(gStarOffsetsY, 1000);
MEM_ARRAY_ALLOCATE(gStarFillColors, 1000);
-
Rand_SetSeed(1, 29000, 9876);
for (i = 0; i < 1000; i++) {
@@ -583,7 +579,6 @@ void Play_SetupStarfield(void) {
Play_GenerateStarfield();
gGroundHeight = -25000.0f;
gStarCount = 600;
-
if (gCurrentLevel == LEVEL_AREA_6) {
gStarCount = 300;
}
@@ -692,7 +687,6 @@ void Play_ClearObjectData(void) {
Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource);
PlayerShot_Initialize(&gPlayerShots[i]);
}
-
gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors =
gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y =
@@ -726,7 +720,6 @@ void Play_UpdateFillScreen(void) {
gFillScreenAlphaStep = 16;
Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f);
-
if (gScreenFlashTimer != 0) {
gScreenFlashTimer--;
if ((gScreenFlashTimer & 2) != 0) {
@@ -891,7 +884,6 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
} else {
player->mercyTimer = 20;
}
-
if (gHasShield[player->num]) {
Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num);
gShieldTimer[player->num] = 5;
@@ -975,7 +967,6 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
player->knockback.x = sp38.x;
player->knockback.y = sp38.y;
player->knockback.z = sp38.z;
-
if (Rand_ZeroOne() < 0.5f) {
Player_DamageWings(player, 1, 15);
} else {
@@ -1193,7 +1184,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
var_fv1 = sp88.y + yPos;
var_fa0 = sp88.z + zPos;
}
-
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
*index = i + 1;
if (hitboxData[-1] == HITBOX_SHADOW) {
@@ -1219,7 +1209,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
var_fv1 = sp88.y + yPos;
var_fa0 = sp88.z + zPos;
}
-
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
*index = i + 1;
return 4;
@@ -1238,7 +1227,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
var_fv1 = sp88.y + yPos;
var_fa0 = sp88.z + zPos;
}
-
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
*index = i + 1;
return 1;
@@ -1257,7 +1245,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
var_fv1 = sp88.y + yPos;
var_fa0 = sp88.z + zPos;
}
-
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
*index = i + 1;
return 2;
@@ -1732,7 +1719,6 @@ void Player_CollisionCheck(Player* player) {
if ((gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) {
sp8C = 4000.0f;
}
-
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
if (scenery360->obj.status == OBJ_ACTIVE) {
spC8.x = scenery360->obj.pos.x - player->pos.x;
@@ -2174,7 +2160,6 @@ void Player_CollisionCheck(Player* player) {
spC8.y = 7.0f;
}
spBC.y = spC8.x + spC8.y;
-
if ((fabsf(opponent->trueZpos - player->trueZpos) <= spBC.z) &&
(fabsf(opponent->pos.y - player->pos.y) <= spBC.y) &&
(fabsf(opponent->pos.x - player->pos.x) <= spBC.x)) {
@@ -2198,7 +2183,6 @@ void Player_CollisionCheck(Player* player) {
}
}
}
-
if (gUseDynaFloor) {
if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) {
if (gCurrentLevel == LEVEL_ZONESS) {
@@ -2231,7 +2215,6 @@ void Player_CollisionCheck(Player* player) {
player->knockback.y = 30.0f;
}
}
-
if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f),
player->pos.y + (player->hit2.y - player->pos.y) * 1.5f, player->hit2.z)) {
if (gCurrentLevel == LEVEL_ZONESS) {
@@ -2681,7 +2664,6 @@ void Player_InitVersus(void) {
s32 i;
Player_ResetVsData();
-
for (i = 0; i < 4; i++) {
gPlayerNum = i;
Player_Initialize(&gPlayer[i]);
@@ -2696,7 +2678,6 @@ void Play_Init(void) {
s32 i;
gArwingSpeed = 40.0f;
-
for (i = 0; i < ARRAY_COUNT(gControllerRumbleEnabled); i++) {
gControllerRumbleEnabled[i] = 0;
}
@@ -2734,7 +2715,6 @@ void Play_Init(void) {
gLevelMode = LEVELMODE_ON_RAILS;
gPathTexScroll = D_bg_8015F968 = 0.0f;
D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false;
-
if (gCurrentLevel >= LEVEL_FORTUNA) {
gLevelMode = LEVELMODE_ALL_RANGE;
if (gCurrentLevel == LEVEL_VERSUS) {
@@ -2798,7 +2778,6 @@ void Play_Init(void) {
if (gCurrentLevel == LEVEL_AQUAS) {
gWaterLevel = 1000.0f;
}
-
gLoadLevelObjects = false;
gCamCount = 1;
@@ -2812,7 +2791,6 @@ void Play_Init(void) {
MEM_ARRAY_ALLOCATE(gPlayer, gCamCount);
Player_InitializeAll();
-
for (i = 0; i < gCamCount; i++) {
gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT;
gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0;
@@ -2822,7 +2800,6 @@ void Play_Init(void) {
if (gLevelMode == LEVELMODE_ALL_RANGE) {
MEM_ARRAY_ALLOCATE(gScenery360, 200);
-
for (i = 0; i < 200; i++) {
gScenery360[i].obj.status = OBJ_FREE;
}
@@ -2900,7 +2877,6 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3
sp44.x = 0.0f;
sp44.y = 0.0f;
sp44.z = speed;
-
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
sp44.x = arg2;
@@ -2908,7 +2884,6 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3
sp44.z = 0.0f;
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp2C);
-
shot->obj.status = SHOT_ACTIVE;
shot->vel.x = sp38.x;
shot->vel.y = sp38.y;
@@ -2921,7 +2896,6 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3
} else {
shot->timer = 37;
}
-
if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) {
shot->obj.pos.x = player->pos.x + sp2C.x;
shot->obj.pos.y = player->pos.y + sp2C.y;
@@ -3089,7 +3063,6 @@ void Player_SmartBomb(Player* player) {
gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f;
gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0;
-
Audio_InitBombSfx(player->num, 1);
Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource);
}
@@ -3101,7 +3074,6 @@ void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotI
Vec3f sp44;
PlayerShot_Initialize(shot);
-
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY);
@@ -3123,7 +3095,6 @@ void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotI
Matrix_Translate(gCalcMatrix, 0.0f, player->yBob, 0, MTXF_APPLY);
Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY);
-
sp5C.x = 0.0f;
sp5C.y = 0.0f;
sp5C.z = 0;
@@ -3196,7 +3167,6 @@ bool Player_UpdateLockOn(Player* player) {
if (gChargeTimers[player->num] == 20) {
Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_SEARCH, player->num);
}
-
if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG) && (player->form == FORM_ARWING) &&
(player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) &&
((gGameFrameCount % 4) == 0) && Player_CanLockOn(player->num)) {
@@ -3263,7 +3233,6 @@ bool Player_UpdateLockOn(Player* player) {
if (gInputPress->button & B_BUTTON) {
hasBombTarget = false;
-
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) {
hasBombTarget = true;
@@ -3277,7 +3246,6 @@ bool Player_UpdateLockOn(Player* player) {
break;
}
}
-
if (hasBombTarget && (gBombCount[player->num] != 0) &&
(gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == SHOT_FREE)) {
gBombCount[player->num]--;
@@ -3304,7 +3272,6 @@ void Player_Shoot(Player* player) {
(player->arwing.leftWingState <= WINGSTATE_BROKEN)) {
gLaserStrength[player->num] = LASERS_SINGLE;
}
-
if (!Player_UpdateLockOn(player)) {
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
Math_SmoothStepToF(&player->arwing.laserGunsYpos, -10.0f, 1.0f, 0.5f, 0.0f);
@@ -3480,7 +3447,6 @@ void Player_UpdatePath(Player* player) {
break;
}
}
-
while (true) {
if (player->bankAngle < -360.0f) {
player->bankAngle += 360.0f;
@@ -3498,7 +3464,6 @@ void Player_UpdatePath(Player* player) {
gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f);
gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f);
}
-
if (player->pathChangeTimer != 0) {
player->pathChangeTimer--;
Math_SmoothStepToF(&player->yRot_114, player->pathChangeYaw, 0.03f, 0.5f, 0.0001f);
@@ -3614,7 +3579,6 @@ void Player_MoveArwing360(Player* player) {
gPlayerTurnRate *= 2.0f;
scale = 0.2f;
}
-
if ((player->zRotBank < -10.0f) && (sp7C < 0)) {
gPlayerTurnRate *= 2.0f;
scale = 0.2f;
@@ -3686,7 +3650,6 @@ void Player_MoveArwing360(Player* player) {
sp4C.y -= 2.5f;
}
sp4C.z = player->baseSpeed + player->boostSpeed;
-
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40);
player->vel.x = sp40.x;
@@ -3755,14 +3718,12 @@ void Player_PerformLoop(Player* player) {
} else {
player->boostMeter += 1.0f;
}
-
if (player->boostMeter > 90.0f) {
player->boostMeter = 90.0f;
}
player->unk_190 = 2;
Math_SmoothStepToF(&player->aerobaticPitch, 360.0f, 0.1f, 5.0f, 0.001f);
-
if (player->aerobaticPitch > 350.0f) {
player->somersault = false;
if (gLevelMode != LEVELMODE_ON_RAILS) {
@@ -3798,7 +3759,6 @@ void Player_PerformLoop(Player* player) {
player->vel.y = sp40.y;
player->pos.x += player->vel.x;
player->pos.y += player->vel.y;
-
if (player->pos.y < player->pathFloor + player->yPath) {
player->pos.y = player->pathFloor + player->yPath;
player->vel.y = 0.0f;
@@ -4044,7 +4004,6 @@ void Player_MoveTank360(Player* player) {
Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate, 0.1f);
}
player->rot_104.y = player->rot.y;
-
var_fa0 = 0.03f;
var_fa1 = 1.5f;
if ((player->zRotBank > 10.0f) && (sp5C < 0.0f)) {
@@ -4080,7 +4039,6 @@ void Player_MoveTank360(Player* player) {
sp44.z = player->baseSpeed;
sp44.z -= fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f);
sp44.z += SIN_DEG(player->unk_000) * player->boostSpeed;
-
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
player->vel.x = sp38.x;
@@ -4117,7 +4075,6 @@ void Player_MoveTank360(Player* player) {
player->pos.x += player->vel.x;
player->vel.y -= player->gravity;
player->pos.y += player->vel.y;
-
if (player->grounded) {
Math_SmoothStepToAngle(&player->rot.x, player->rot_104.x, 0.2f, 5.0f, 0.005f);
Math_SmoothStepToAngle(&player->rot.z, player->rot_104.z, 0.2f, 5.0f, 0.005f);
@@ -4146,7 +4103,6 @@ void Player_MoveTank360(Player* player) {
Player_CheckBounds360(player);
player->trueZpos = player->pos.z;
player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll;
-
if (player->grounded) {
player->rockPhase += player->baseSpeed * 5.0f;
player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f;
@@ -4185,7 +4141,6 @@ void Player_MoveOnFoot(Player* player) {
s32 pad;
player->camRoll = 0.0f;
-
var_fa0 = 0.0f;
if (player->pos.y > 10.0f) {
var_fa0 = 20.0f;
@@ -4280,12 +4235,10 @@ void Player_MoveOnFoot(Player* player) {
if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) {
player->unk_00C = 0.0f;
}
-
player->yBob = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f);
if (player->yBob < -0.5f) {
player->yBob = -0.5f;
}
-
player->yBob -= 3.0f;
player->unk_20C = player->unk_00C;
@@ -4309,7 +4262,6 @@ void Player_MoveOnFoot(Player* player) {
if (player->unk_010 < 50.0f) {
player->unk_010 += 2.0f;
}
-
sp64 = player->baseSpeed;
if (gGameFrameCount & 4) {
sp64 = 2.0f * player->baseSpeed;
@@ -4346,7 +4298,6 @@ void Player_MoveOnFoot(Player* player) {
player->unk_00C = 0.0f;
}
}
-
if (!player->grounded) {
switch (gPlayerNum) {
case 0:
@@ -4364,7 +4315,6 @@ void Player_MoveOnFoot(Player* player) {
}
Math_SmoothStepToVec3fArray(sp48, player->jointTable, 1, 24, 0.2f, 10.0f, 0.01f);
}
-
player->gravity = 2.0f;
if ((gInputPress->button & Z_TRIG) && player->grounded) {
player->vel.y = 12.0f;
@@ -4471,7 +4421,6 @@ void Player_Setup(Player* playerx) {
player->pathFloor = gGroundHeight + 40.0f;
player->unk_0A8 = 3000.0f;
}
-
player->baseSpeed = gArwingSpeed;
player->pos.y = 350.0f;
@@ -4512,7 +4461,6 @@ void Player_Setup(Player* playerx) {
if (gCurrentLevel != LEVEL_CORNERIA) {
gSavedGroundSurface = SURFACE_GRASS;
}
-
gGoldRingCount[0] = gSavedGoldRingCount[0];
do {
if (gGoldRingCount[0] > 3) {
@@ -4551,7 +4499,6 @@ void Player_Setup(Player* playerx) {
gGroundSurface = gSavedGroundSurface;
gPathProgress = player->zPath = gSavedPathProgress;
player->pos.z = player->trueZpos = -player->zPath;
-
if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (gCurrentLevel == LEVEL_MACBETH) {
sp2E = gObjectLoadIndex;
@@ -4577,7 +4524,6 @@ void Player_Setup(Player* playerx) {
player->pos.z = D_800D3124[gPlayerNum];
player->yRot_114 = D_800D3154[gPlayerNum];
player->form = gPlayerForms[gPlayerNum];
-
switch (player->form) {
case FORM_ARWING:
break;
@@ -4592,7 +4538,6 @@ void Player_Setup(Player* playerx) {
player->pos.y = 0.0f;
player->baseSpeed = 15.0f;
player->groundPos.y = 0;
-
switch (gPlayerNum) {
case 0:
sp38 = LOAD_ASSET(D_versus_302E56C);
@@ -4820,7 +4765,6 @@ void Player_UpdateArwingRoll(Player* player) {
Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f);
player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f);
-
if (player->barrelRollAlpha > 0) {
player->barrelRollAlpha -= 30;
if (player->barrelRollAlpha <= 0) {
@@ -4911,7 +4855,6 @@ void Player_UpdateTankRoll(Player* player) {
player->zRotBank = 0.0f;
}
}
-
if (player->zRotBank < 0.0f) {
player->zRotBank += 8.0f;
if (player->zRotBank > 0.0f) {
@@ -4971,7 +4914,6 @@ void Player_ArwingBoost(Player* player) {
player->sfx.boost = 0;
var = gInputPress->stick_y; // fake?
-
if (gLoopDownTimers[gPlayerNum] != 0) {
gLoopDownTimers[gPlayerNum]--;
}
@@ -5143,7 +5085,6 @@ void Player_ArwingBrake(Player* player) {
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f);
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f);
}
-
player->boostMeter += sp30;
if (player->boostMeter > 90.0f) {
player->boostCooldown = true;
@@ -5182,7 +5123,6 @@ void Player_TankBoostBrake(Player* player) {
Math_SmoothStepToF(&player->boostMeter, 0.0f, 1.0f, 1.0f, 0.0f);
}
player->boostActive = false;
-
if (player->boostMeter == 0.0f) {
player->boostCooldown = false;
} else if (!(gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG) &&
@@ -5206,7 +5146,6 @@ void Player_TankBoostBrake(Player* player) {
player->boostCooldown = true;
}
}
-
if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) {
if (player->boostMeter == 0.0f) {
Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BRAKE, player->num);
@@ -5234,7 +5173,6 @@ void Player_UpdateTankJets(Player* player) {
}
player->unk_188 = 0.0f;
-
player->zRotBank += 4.0f;
if (player->zRotBank > 50.0f) {
player->zRotBank = 50.0f;
@@ -5268,7 +5206,6 @@ void Player_UpdateTankJets(Player* player) {
}
player->unk_188 = 0.0f;
-
player->zRotBank -= 4.0f;
if (player->zRotBank < -50.0f) {
player->zRotBank = -50.0f;
@@ -5294,7 +5231,6 @@ void Player_UpdateTankJets(Player* player) {
}
}
}
-
if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) {
player->zRotBank += (((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f);
Math_SmoothStepToAngle(&player->rot.x, 0.0f, 0.05f, 5.0f, 0.00001f);
@@ -5356,7 +5292,6 @@ void Player_UpdateEffects(Player* player) {
}
}
}
-
if (gRightWingFlashTimer[player->num] != 0) {
gRightWingFlashTimer[player->num]--;
if (gRightWingFlashTimer[player->num] == 1000) {
@@ -5375,7 +5310,6 @@ void Player_UpdateEffects(Player* player) {
if (gRightWingDebrisTimer[player->num] != 0) {
gRightWingDebrisTimer[player->num]--;
}
-
if (gShieldTimer[player->num] != 0) {
gShieldTimer[player->num]--;
Math_SmoothStepToF(&gShieldAlpha[player->num], 128.0f, 1.0f, 40.0f, 0.01f);
@@ -5410,7 +5344,6 @@ void Player_UpdateEffects(Player* player) {
}
player->timer_278--;
}
-
if (player->hitTimer > 0) {
if (player->hitTimer > 3) {
*gControllerRumble = 1;
@@ -5438,7 +5371,6 @@ void Player_UpdateEffects(Player* player) {
player->rot.y = 0;
Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0);
}
-
if (player->hitTimer == 0) {
player->damageShake = 0;
}
@@ -5513,7 +5445,6 @@ void Play_dummy_800B41E0(Player* player) {
void Player_Down(Player* player) {
player->state_1C8 = PLAYERSTATE_1C8_DOWN;
-
if (!gVersusMode) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
@@ -5542,19 +5473,16 @@ void Player_UpdateOnRails(Player* player) {
gInputHold->button = gBoostButton[player->num];
player->boostMeter = 1.0f;
}
-
Player_ArwingBank(player);
Player_ArwingBoost(player);
Player_ArwingBrake(player);
Play_dummy_800B41E0(player);
Player_UpdateArwingRoll(player);
-
if (player->somersault) {
Player_PerformLoop(player);
} else {
Player_MoveArwingOnRails(player);
}
-
Player_UpdatePath(player);
Player_Shoot(player);
Player_CollisionCheck(player);
@@ -5562,7 +5490,6 @@ void Player_UpdateOnRails(Player* player) {
Player_WaterEffects(player);
Player_FloorCheck(player);
Player_LowHealthAlarm(player);
-
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
Player_Down(player);
player->vel.x *= 0.2f;
@@ -5591,7 +5518,6 @@ void Player_UpdateOnRails(Player* player) {
Player_CollisionCheck(player);
Player_FloorCheck(player);
Player_LowHealthAlarm(player);
-
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
Player_Down(player);
}
@@ -5607,19 +5533,16 @@ void Player_Update360(Player* player) {
Player_ArwingBrake(player);
Play_dummy_800B41E0(player);
Player_UpdateArwingRoll(player);
-
if (player->somersault) {
Player_PerformLoop(player);
} else {
Player_MoveArwing360(player);
}
-
Player_Shoot(player);
Player_CollisionCheck(player);
Player_WaterEffects(player);
Player_FloorCheck(player);
Player_LowHealthAlarm(player);
-
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
Player_Down(player);
player->vel.y = 5.0f;
@@ -5665,7 +5588,6 @@ void Player_Update360(Player* player) {
Player_CollisionCheck(player);
Player_FloorCheck(player);
Player_LowHealthAlarm(player);
-
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
Player_Down(player);
}
@@ -5885,7 +5807,6 @@ void Player_Update(Player* player) {
Player_CheckItemCollect(player);
}
break;
-
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
player->alternateView = false;
gPauseEnabled = false;
@@ -5963,7 +5884,6 @@ void Player_Update(Player* player) {
Math_SmoothStepToF(&player->cam.eye.y, 500.0f, 0.05f, 10.0f, 0.0f);
Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + 500.0f, 0.05f, 20.0f, 0.0f);
}
-
if (player->csTimer == 0) {
if (gCamCount == 4) {
player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
@@ -6011,13 +5931,11 @@ void Player_Update(Player* player) {
gDrawMode = DRAW_NONE;
}
break;
-
case 4:
gNextGameState = GSTATE_MAP;
gLastGameState = GSTATE_PLAY;
gDrawMode = DRAW_NONE;
break;
-
default:
gDrawMode = DRAW_NONE;
break;
@@ -6044,7 +5962,6 @@ void Player_Update(Player* player) {
Math_SmoothStepToF(&player->unk_148, sp1CC, 1.0f, 0.05f, 0.0f);
Math_SmoothStepToF(&player->unk_14C, sp1CC, 1.0f, 0.05f, 0.0f);
Math_SmoothStepToF(&player->pathWidth, sp1C8, 1.0f, 10.0f, 0.0f);
-
if (player->form == FORM_ARWING) {
Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f);
if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
@@ -6065,7 +5982,6 @@ void Camera_UpdateArwingOnRails(Player* player) {
f32 temp;
gCsCamEyeX = (player->pos.x - player->xPath) * player->unk_148;
-
if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) ||
(player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) {
gCsCamEyeY = (player->pos.y - player->yPath) * player->unk_148;
@@ -6094,7 +6010,6 @@ void Camera_UpdateArwingOnRails(Player* player) {
gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f;
gCsCamAtY += player->xRock * 5.0f;
gCsCamAtY -= player->unk_02C * 0.25f;
-
switch (sOverheadCam) {
case 0:
Math_SmoothStepToF(&sOverheadCamDist, 0.0f, 0.4f, 10.0f, 0);
@@ -6103,7 +6018,6 @@ void Camera_UpdateArwingOnRails(Player* player) {
Math_SmoothStepToF(&sOverheadCamDist, 200.0f, 0.4f, 10.0f, 0);
break;
}
-
gCsCamEyeX += player->xPath;
gCsCamAtX += player->xPath;
gCsCamEyeY += player->yPath + sOverheadCamDist;
@@ -6123,14 +6037,12 @@ void Camera_UpdateArwingOnRails(Player* player) {
Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f);
}
gCsCamAtY += player->yPath + (sOverheadCamDist * 0.5f);
-
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f);
-
temp = -player->rot.z;
if (gLevelType == LEVELTYPE_PLANET) {
Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f);
@@ -6148,7 +6060,6 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) {
Matrix_RotateY(gCalcMatrix, (player->rot.y + player->damageShake) * M_DTOR * 0.75f, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, (player->rot.x + player->damageShake) * M_DTOR * 0.75f, MTXF_APPLY);
-
sp4C.x = 0;
sp4C.y = 0;
sp4C.z = -1000.0f;
@@ -6161,7 +6072,6 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) {
gCsCamAtX = player->pos.x + sp40.x;
gCsCamAtY = player->pos.y + player->yBob + sp40.y;
gCsCamAtZ = player->trueZpos + gPathProgress + sp40.z;
-
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f);
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f);
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f);
@@ -6169,7 +6079,6 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) {
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f);
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f);
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0);
-
player->camRoll = -(player->bankAngle + player->rockAngle);
if (arg1 != 0) {
player->cam.eye.x = gCsCamEyeX;
@@ -6271,7 +6180,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
-
sp74.x = 0.0f;
sp74.y = 0.0f;
if (player->alternateView) {
@@ -6279,7 +6187,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
} else {
sp74.z = 300.0f - player->camDist;
}
-
if (player->somersault) {
sp74.z += 500.0f;
}
@@ -6302,7 +6209,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
atX = player->pos.x + player->damageShake;
var_fv0 = (player->somersault) ? 1.0f : 0.79f;
-
atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->xRock * 5.0f);
atY += (player->unk_02C * 0.5f);
if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) {
@@ -6322,7 +6228,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
eyeZ += sp68.z;
atX += sp68.x;
atZ += sp68.z;
-
if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) {
Math_SmoothStepToF(&player->cam.eye.x, eyeX, player->unk_014, 30000.0f, 0);
Math_SmoothStepToF(&player->cam.eye.y, eyeY, player->unk_014, 30000.0f, 0);
@@ -6330,7 +6235,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
Math_SmoothStepToF(&player->camRoll, player->rot.y * -0.3f, 0.1f, 1.0f, 0);
Math_SmoothStepToF(&player->unk_014, 0.2f, 0.1f, 0.005f, 0.0f);
}
-
Math_SmoothStepToF(&player->cam.at.x, atX, player->unk_01C, 30000.0f, 0);
Math_SmoothStepToF(&player->cam.at.y, atY, player->unk_018, 30000.0f, 0);
Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0);
@@ -6358,7 +6262,6 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
-
sp54.x = 0.0f;
if (player->alternateView) {
sp54.y = 150.0f;
@@ -6369,7 +6272,6 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
}
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48);
-
if (player->alternateView) {
Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f);
} else {
@@ -6402,7 +6304,6 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
Math_SmoothStepToF(&player->cam.eye.y, sp40, 0.1f, 200.0f, 0.001f);
Math_SmoothStepToF(&player->cam.eye.z, sp3C, 0.1f, 200.0f, 0.001f);
Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f);
-
if (arg1 != 0) {
player->cam.eye.x = sp44;
player->cam.eye.y = sp40;
@@ -6454,7 +6355,6 @@ void Camera_UpdateOnFoot360(Player* player, s32 arg1) {
Math_SmoothStepToF(&player->cam.eye.y, sp4C.y, 0.3f, 65.0f, 0.001f);
Math_SmoothStepToF(&player->cam.eye.z, sp4C.z, 0.3f, 65.0f, 0.001f);
Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f);
-
if (arg1 != 0) {
player->cam.eye.x = sp4C.x;
player->cam.eye.y = sp4C.y;
@@ -6479,7 +6379,6 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
if (yaw <= -M_PI / 2) {
yaw += M_PI;
}
-
tempf = 0.0f;
if (gCurrentLevel == LEVEL_UNK_15) {
tempf = gPlayer[0].cam.eye.y * 0.03f;
@@ -6563,7 +6462,6 @@ void Camera_Update(Player* player) {
player->cam.at.z = player->trueZpos + gPathProgress - 1.0f;
}
break;
-
case PLAYERSTATE_1C8_NEXT:
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
break;
@@ -7027,7 +6925,6 @@ void Play_Main(void) {
Audio_ClearVoice();
Audio_SetEnvSfxReverb(0);
Play_ClearObjectData();
-
for (i = 0; i < gCamCount; i++) {
Audio_KillSfxBySource(gPlayer[i].sfxSource);
Audio_StopPlayerNoise(i);
diff --git a/src/engine/fox_reset.c b/src/engine/fox_reset.c
index e191109c..8f3db3f4 100644
--- a/src/engine/fox_reset.c
+++ b/src/engine/fox_reset.c
@@ -33,7 +33,6 @@ void Graphics_NMIWipe(void) {
if (sWipeBarLength == 0) {
AudioThread_PreNMIReset();
}
-
sWipeBarLength += SCREEN_WIDTH / 7;
if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing?
osViBlack(true);
diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c
index 3e3211b3..f99eba90 100644
--- a/src/engine/fox_tank.c
+++ b/src/engine/fox_tank.c
@@ -866,7 +866,6 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
player->rollRate = player->baseRollRate = -20;
}
}
-
if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) &&
(D_800C9F10 <= arg3 + sp58.y)) {
D_800C9F10 = arg3 + sp58.y;
@@ -1458,7 +1457,6 @@ void func_tank_800481F4(Player* player) {
player->vel.x = 0.0f;
player->vel.y = 30.0f;
player->pos.x = player->basePos.x;
-
actor->dmgType = DMG_COLLISION;
if (actor->info.damage != 0) {
Player_ApplyDamage(player, 0, 20);