Player and Vs docs, some improvement to ve1 boss (#259)

* playerstuff

* stuff

* small fixes

* Torch

* torch update again
This commit is contained in:
petrie911
2024-05-25 12:17:03 -05:00
committed by GitHub
parent 03ce166cca
commit 0f6d7cca33
61 changed files with 1382 additions and 1461 deletions
+3 -3
View File
@@ -95,7 +95,7 @@ bool AllRange_PlayMessage(u16* msg, RadioCharacterId rcid) {
}
void AllRange_DrawCountdown(void) {
if (gShowAllRangeCountdown != 0) {
if (gShowAllRangeCountdown) {
s32 seconds = gAllRangeCountdown[1];
HUD_DrawCountdown(gAllRangeCountdown, gAllRangeCountdownScale);
@@ -144,7 +144,7 @@ void AllRange_GreatFoxRepair(Player* player) {
gCsFrameCount++;
switch (player->csState) {
case 0:
player->hitTimer = player->timer_498 = player->damage = player->barrelRollAlpha = player->boostMeter =
player->hitTimer = player->mercyTimer = player->damage = player->barrelRollAlpha = player->boostMeter =
player->boostCooldown = player->somersault = gCsFrameCount = 0;
player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x =
player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f;
@@ -1476,7 +1476,7 @@ void ActorAllRange_Update(Actor* this) {
ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF);
}
break;
} else if ((this->iwork[4] > 200) && (gPlayer[0].timer_224 != 0)) {
} else if ((this->iwork[4] > 200) && (gPlayer[0].dmgEffectTimer != 0)) {
this->iwork[4] = 100;
break;
}
+1 -1
View File
@@ -22,7 +22,7 @@
#include "assets/ast_zoness.h"
#include "prevent_bss_reordering2.h"
#include "prevent_bss_reordering3.h"
// #include "prevent_bss_reordering3.h"
f32 gWarpZoneBgAlpha;
u8 D_bg_8015F964; // related to water surfaces
+2 -2
View File
@@ -6,8 +6,8 @@
s32 gSceneId;
s32 gSceneSetup;
s32 D_ctx_80177824; // some sort of flag
s32 D_ctx_8017782C; // some sort of flag. all range related?
s32 gClearPlayerInfo; // some sort of flag
s32 D_ctx_8017782C; // some sort of flag. all range related?
GameState gGameState;
s32 gNextGameStateTimer;
s32 gVsItemSpawnTimer;
+14 -14
View File
@@ -465,7 +465,7 @@ void Cutscene_EnterWarpZone(Player* player) {
if (player->camDist < -15000.0f) {
player->camDist = 0.0f;
player->warpCamSpeed = 0.0f;
player->unk_234 = 0;
player->draw = false;
}
}
var_v0 = 1;
@@ -518,7 +518,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->meteoWarpTimer = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0;
player->unk_234 = 1;
player->draw = true;
gLevelPhase = 1;
gCamDistortion = 0.15f;
AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0);
@@ -798,7 +798,7 @@ void Cutscene_AllRangeMode(Player* player) {
Math_SmoothStepToF(&D_ctx_80177A48[2], -70.0f, 0.1f, 0.7f, 0.0f);
if (D_ctx_80177A48[1] > 220.0f) {
player->unk_204 = 2;
player->wingPosition = 2;
}
if ((gCsFrameCount > 135) && (gCsFrameCount < 180)) {
@@ -1225,7 +1225,7 @@ void Cutscene_CoComplete2(Player* player) {
gCsCamAtX += D_ctx_80177A48[7];
gCsCamAtY += D_ctx_80177A48[8];
gCsCamAtZ += D_ctx_80177A48[9];
player->unk_234 = 0;
player->draw = false;
if (player->csTimer == 0) {
player->state_1C8 = PLAYERSTATE_1C8_NEXT;
player->csTimer = 0;
@@ -1556,7 +1556,7 @@ void Cutscene_KillPlayer(Player* player) {
Player_PlaySfx(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num);
player->state_1C8 = PLAYERSTATE_1C8_NEXT;
player->csTimer = 70;
player->timer_224 = 20;
player->dmgEffectTimer = 20;
gFadeoutType = 7;
if (player->grounded) {
@@ -1615,7 +1615,7 @@ void Cutscene_KillPlayer(Player* player) {
}
}
void func_demo_8004D738(Player* player) {
void Cutscene_LandmasterDown(Player* player) {
player->pos.y += 30.0f;
func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f);
if (gCamCount == 1) {
@@ -1627,7 +1627,7 @@ void func_demo_8004D738(Player* player) {
Cutscene_KillPlayer(player);
}
void func_demo_8004D828(Player* player) {
void Cutscene_ArwingDown360(Player* player) {
s32 i;
Vec3f src;
Vec3f dest;
@@ -1737,12 +1737,12 @@ void func_demo_8004D828(Player* player) {
player->cam.at.y = player->pos.y;
}
if (gVersusMode != 0) {
if (gVersusMode) {
Player_CheckBounds360(player);
}
}
void func_demo_8004DEF8(Player* player) {
void Cutscene_ArwingDownOnRails(Player* player) {
s32 i;
if (player->rot.x < 0.0f) {
@@ -1841,9 +1841,9 @@ void Cutscene_PlayerDown(Player* player) {
switch (player->form) {
case FORM_ARWING:
if (gLevelMode == LEVELMODE_ALL_RANGE) {
func_demo_8004D828(player);
Cutscene_ArwingDown360(player);
} else {
func_demo_8004DEF8(player);
Cutscene_ArwingDownOnRails(player);
Player_UpdatePath(player);
}
Player_CollisionCheck(player);
@@ -1851,15 +1851,15 @@ void Cutscene_PlayerDown(Player* player) {
break;
case FORM_LANDMASTER:
func_demo_8004D738(player);
Cutscene_LandmasterDown(player);
break;
case FORM_BLUE_MARINE:
Aquas_801AB9B0(player);
Aquas_BlueMarineDown(player);
break;
case FORM_ON_FOOT:
func_demo_8004D738(player);
Cutscene_LandmasterDown(player);
break;
}
}
+17 -17
View File
@@ -18,7 +18,7 @@ f32 D_display_801615B8[4];
s32 D_display_800CA220 = 0;
u8 sPlayersVisible[] = { 0, 0, 0, 0 }; //
s32 sDrawCockpit = 0; //
s32 D_display_800CA22C = 0; //
s32 D_display_800CA22C = false; //
f32 gCamDistortion = 0.0f;
Actor* gTeamHelpActor = NULL;
s32 gTeamHelpTimer = 0;
@@ -417,7 +417,7 @@ void func_display_8005314C(void) {
bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) {
WingInfo* wings = (WingInfo*) wingData;
if ((D_display_800CA22C != 0) && (gPlayer[0].unk_200 == 0)) {
if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
func_display_8005314C();
}
@@ -429,7 +429,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->rightState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3015120;
}
if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) {
if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C();
if (gRightWingFlashTimer[0] > 1000) {
@@ -444,7 +444,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->rightState != 2) {
*gfxPtr = NULL;
}
if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) {
if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C();
if (gRightWingFlashTimer[0] > 1000) {
@@ -461,7 +461,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->leftState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3014BF0;
}
if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) {
if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C();
if (gLeftWingFlashTimer[0] > 1000) {
@@ -476,7 +476,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->leftState != 2) {
*gfxPtr = NULL;
}
if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) {
if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C();
if (gLeftWingFlashTimer[0] > 1000) {
@@ -538,7 +538,7 @@ void func_display_80053658(WingInfo* wings) {
}
Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix);
}
D_display_800CA22C = 0;
D_display_800CA22C = false;
modelId = wings->modelId;
if (D_display_800CA220 != 0) {
modelId = 1;
@@ -644,7 +644,7 @@ void func_display_80053C38(Player* player, s32 arg1) {
player->wings.unk_28 = player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C =
player->wings.unk_10 = 0.0f;
}
D_display_800CA22C = 1;
D_display_800CA22C = true;
gReflectY = arg1;
func_display_80053658(&player->wings);
}
@@ -656,7 +656,7 @@ void func_display_80053F7C(Player* player) {
s32 i;
if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) &&
(player->unk_234 != 0) &&
player->draw &&
(((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) ||
(gGameState == GSTATE_MENU))) {
for (i = 0; i < 2; i++) {
@@ -1044,7 +1044,7 @@ void func_display_80055B58(Player* player) {
f32 var_fv0;
s32 pad[3];
if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) {
if (player->draw && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) {
switch (player->form) {
case FORM_ARWING:
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR,
@@ -1104,7 +1104,7 @@ void func_display_80055E98(Player* player) {
sp5C = 70.0f;
sp58 = -18.0f;
if (player->unk_204 == 2) {
if (player->wingPosition == 2) {
sp5C = 108.0f;
sp58 = -22.0f;
}
@@ -1155,7 +1155,7 @@ void func_display_80055E98(Player* player) {
}
void func_display_80056230(Player* player) {
if ((player->unk_234 != 0) && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
if (player->draw && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
(gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY);
@@ -1197,7 +1197,7 @@ void func_display_800564C0(Player* player, s32 arg1) {
s32 i;
Vec3f sp50 = { 0.0f, 0.0f, 0.0f };
if (player->unk_234 != 0) {
if (player->draw) {
Matrix_Push(&gGfxMatrix);
if (player->form == FORM_LANDMASTER) {
if (player->grounded) {
@@ -1281,7 +1281,7 @@ void func_display_800564C0(Player* player, s32 arg1) {
Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
}
switch (player->unk_200) {
switch (player->dmgEffect) {
case 0:
if (!gVersusMode) {
if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_TITANIA)) {
@@ -1330,7 +1330,7 @@ void func_display_80056E2C(Player* player) {
f32 sp30;
f32 sp2C;
if ((player->unk_234 != 0) && (player->unk_240 == 0)) {
if (player->draw && !player->hideShadow) {
sp34 = D_display_800CA334[gGameFrameCount % 8U];
sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U];
if (player->grounded) {
@@ -1350,8 +1350,8 @@ void func_display_80056E2C(Player* player) {
player->groundPos.z + player->zPath, MTXF_APPLY);
}
Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, player->unk_248, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, player->unk_24C, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY);
if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) {
sp2C = player->bankAngle + player->rockAngle + player->damageShake;
+2 -2
View File
@@ -512,7 +512,7 @@ void func_edisplay_8005B388(Actor* actor) {
Vec3f sp30;
Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30);
if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (gBossActive == 0)) ||
if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && !gBossActive) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
(gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
(gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) {
@@ -548,7 +548,7 @@ void func_edisplay_8005B388(Actor* actor) {
func_display_80053658(&D_edisplay_80161630);
} else if (gLevelType == LEVELTYPE_PLANET) {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
} else if (gPlayer[0].unk_204 == 2) {
} else if (gPlayer[0].wingPosition == 2) {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4003BD0);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870);
+7 -7
View File
@@ -982,7 +982,7 @@ void func_effect_8007A748(Effect* effect) {
bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) {
if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) &&
(fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->timer_498 == 0)) {
(fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->mercyTimer == 0)) {
Player_ApplyDamage(player, 0, effect->info.damage);
return true;
} else {
@@ -2212,7 +2212,7 @@ void func_effect_8007DB70(Effect* effect) {
(fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) {
if ((effect->obj.pos.y < gPlayer[0].pos.y) &&
((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) &&
(gPlayer[0].timer_498 == 0)) {
(gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage);
}
}
@@ -2869,11 +2869,11 @@ void func_effect_8007FE88(Effect* effect) {
effect->vel.x = destVelocity.x;
effect->vel.y = destVelocity.y;
effect->vel.z = destVelocity.z;
gPlayer[0].unk_2C4++;
gPlayer[0].deflectCount++;
AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0);
}
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) {
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage);
gPlayer[0].knockback.x = 20.0f;
if (effect->vel.x < 0.0f) {
@@ -3002,11 +3002,11 @@ void func_effect_8008040C(Effect* effect) {
effect->vel.x = destVelocity.x;
effect->vel.y = destVelocity.y;
effect->vel.z = destVelocity.z;
gPlayer[0].unk_2C4++;
gPlayer[0].deflectCount++;
AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0);
}
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) {
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage);
gPlayer[0].knockback.x = 20.0f;
if (effect->vel.x < 0.0f) {
@@ -3813,7 +3813,7 @@ void func_effect_80081C5C(Effect* effect) {
if ((((effect->timer_50 == 0) &&
(fabsf(gPlayer[0].pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) &&
(fabsf(gPlayer[0].pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) &&
(gPlayer[0].timer_498 == 0)) {
(gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, 40);
}
break;
+1 -2
View File
@@ -1651,8 +1651,7 @@ void Actor_Despawn(Actor* actor) {
s32 i;
if (gVersusMode) {
if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) &&
!((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) {
if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) {
gPlayerScores[actor->dmgSource - 1] += actor->info.bonus;
}
} else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) {
+5 -5
View File
@@ -1165,7 +1165,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) {
}
}
if ((this->eventType == EVID_2) || (this->eventType == EVID_TEAMMATE)) {
if ((this->eventType == EVID_SLIPPY_METEO) || (this->eventType == EVID_TEAMMATE)) {
this->drawShadow = true;
this->iwork[11] = 1;
}
@@ -2152,7 +2152,7 @@ void ActorEvent_800701E0(ActorEvent* this) {
if (gLevelType == LEVELTYPE_PLANET) {
this->timer_04C = RAND_INT(2.9f);
if (this->eventType == EVID_2) {
if (this->eventType == EVID_SLIPPY_METEO) {
this->timer_04C = 1;
if (this->obj.pos.x < this->hitPos.x) {
Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z);
@@ -3043,7 +3043,7 @@ void ActorEvent_Update(ActorEvent* this) {
return;
}
if (this->eventType == EVID_300) {
gPlayer[0].unk_1A4 = this->index;
gPlayer[0].dmgType = this->index;
this->timer_0C2 = 100;
} else if (this->eventType >= EVID_200) {
this->counter_04E++;
@@ -3920,7 +3920,7 @@ void ActorEvent_Draw(ActorEvent* this) {
Actor_DrawEngineAndContrails(this);
break;
case EVID_2:
case EVID_SLIPPY_METEO:
this->fwork[15] -= this->fwork[15] * 0.1f;
this->fwork[26] -= this->fwork[26] * 0.1f;
this->fwork[16] -= this->fwork[16] * 0.1f;
@@ -4309,7 +4309,7 @@ void func_enmy2_800763A4(Actor* actor) {
func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S);
}
if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_2)) {
if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SLIPPY_METEO)) {
if (actor->fwork[17] < 360.0f) {
Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z);
actor->fwork[17] = 777.0f;
+2 -2
View File
@@ -405,7 +405,7 @@ void Game_Update(void) {
case GSTATE_INIT:
gGameState = GSTATE_TITLE;
gTitleState = 1;
D_ctx_80177824 = 1;
gClearPlayerInfo = true;
Memory_FreeAll();
Play_ClearObjectData();
gCamCount = 1;
@@ -552,7 +552,7 @@ void Game_Update(void) {
}
} else {
for (i = 0; i < gCamCount; i++) {
if (gPlayer[i].timer_224 != 0) {
if (gPlayer[i].dmgEffectTimer != 0) {
Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i],
sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue,
+10 -10
View File
@@ -1410,7 +1410,7 @@ void func_hud_80088970(void) {
}
if (D_80161810[0] >= 2) {
gPauseEnabled = 0;
gPauseEnabled = false;
}
player = &gPlayer[gPlayerNum];
@@ -2066,7 +2066,7 @@ s32 func_hud_8008A4DC(void) {
y = 162.000f;
x1 += D_800D1E10 * temp3;
} else {
if ((gVsMatchStart == 0) || (D_versus_80178750 != 0)) {
if (!gVsMatchStart || (D_versus_80178750 != 0)) {
return 0;
}
temp2 = 13000.00f;
@@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) {
(gCurrentLevel == LEVEL_SECTOR_Y))) {
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) {
if ((gActors[i].eventType == EVID_2) || (gActors[i].eventType == EVID_TEAMMATE) ||
if ((gActors[i].eventType == EVID_SLIPPY_METEO) || (gActors[i].eventType == EVID_TEAMMATE) ||
((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) &&
((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) ||
(gActors[i].aiType == AI360_PEPPY)))) {
@@ -2814,7 +2814,7 @@ void func_hud_8008CBE4(void) {
s32 i;
s32 j;
if (gVsMatchType != 0) {
if (gVsMatchType != VS_MATCH_POINTS) {
return;
}
@@ -2829,7 +2829,7 @@ void func_hud_8008CBE4(void) {
break;
case 1:
if (gVsMatchStart == 0) {
if (!gVsMatchStart) {
D_80161758 = 0;
break;
}
@@ -3030,7 +3030,7 @@ void func_hud_8008D984(void) {
}
void func_hud_8008DC34(void) {
if ((gVsMatchStart != 0) && (D_versus_80178750 == 0)) {
if (gVsMatchStart && (D_versus_80178750 == 0)) {
func_hud_8008D250();
func_hud_8008D7F4();
func_hud_8008D4F0(0, 0);
@@ -4916,7 +4916,7 @@ void HUD_AquasStart(Player* player) {
gCsFrameCount = 0;
gDrawBackdrop = 1;
gAqDrawMode = 1;
player->unk_234 = 0;
player->draw = false;
player->csState = 1;
player->unk_208 = 0;
player->baseSpeed = 0.0f;
@@ -5213,7 +5213,7 @@ void HUD_AquasStart(Player* player) {
player->rot.y = 0.0f;
player->baseSpeed = 20.0f;
player->unk_234 = 1;
player->draw = true;
player->csState = 6;
player->csTimer = 1000;
@@ -5713,7 +5713,7 @@ void HUD_AquasComplete(Player* player) {
break;
case 10:
player->unk_234 = 1;
player->draw = true;
gAqDrawMode = 2;
player->csState = 11;
@@ -5952,7 +5952,7 @@ void HUD_AquasComplete(Player* player) {
player->yBob = -SIN_DEG(player->bobPhase) * 0.5f;
player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f;
if (player->unk_234) {
if (player->draw) {
src.x = 0.0f;
src.y = 0.0f;
src.z = -70.0f;
+302 -300
View File
File diff suppressed because it is too large Load Diff
+57 -57
View File
@@ -165,7 +165,7 @@ void func_tank_80043B18(Player* player) {
sp48.y = 0.0f;
sp48.z = -20.0f;
sp38 = player->yRot_114;
if (player->barrelRoll != 0) {
if (player->rollState != 0) {
sp48.x = 0.0f;
sp48.z = RAND_FLOAT_CENTERED(50.0f) + -20.0f;
@@ -422,7 +422,7 @@ void func_tank_80044868(Player* player) {
if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) {
Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f);
}
if (player->barrelRoll != 0) {
if (player->rollState != 0) {
if (player->rollRate < 0) {
player->unk_184 = 15.0f;
}
@@ -480,7 +480,7 @@ void func_tank_80044868(Player* player) {
if (player->baseSpeed != 0.0f) {
func_tank_80043B18(player);
}
if (player->barrelRoll != 0.0f) {
if (player->rollState != 0.0f) {
func_tank_80043B18(player);
}
}
@@ -508,28 +508,28 @@ void func_tank_80045130(Player* player) {
Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f);
if (gInputPress->button & Z_TRIG) {
player->sfx.bank = 1;
if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) {
player->barrelRoll = 1;
player->timer_1E8 = 15;
if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) {
player->rollState = 1;
player->rollTimer = 15;
player->baseRollRate = 20;
player->rollRate = 20;
player->sfx.roll = 1;
AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0);
} else {
player->barrelInputTimerL = 10;
player->rollInputTimerL = 10;
}
}
if (gInputPress->button & R_TRIG) {
player->sfx.bank = 1;
if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) {
player->barrelRoll = 1;
player->timer_1E8 = 15;
if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) {
player->rollState = 1;
player->rollTimer = 15;
player->baseRollRate = -20;
player->rollRate = -20;
player->sfx.roll = 1;
AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0);
} else {
player->barrelInputTimerR = 10;
player->rollInputTimerR = 10;
}
}
player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f);
@@ -678,7 +678,7 @@ void func_tank_80045678(Player* player) {
}
} else {
D_800C9F3C = 0;
if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) {
if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) {
if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) {
func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f,
player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0);
@@ -693,7 +693,7 @@ void func_tank_80045678(Player* player) {
void func_tank_80045E7C(Player* player) {
player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f);
if (player->barrelRoll == 0) {
if (player->rollState == 0) {
if (player->zRotBarrelRoll > 0.0f) {
player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f;
if (player->zRotBarrelRoll < 0.1f) {
@@ -707,18 +707,18 @@ void func_tank_80045E7C(Player* player) {
}
}
}
if (player->barrelInputTimerL != 0) {
player->barrelInputTimerL--;
if (player->rollInputTimerL != 0) {
player->rollInputTimerL--;
}
if (player->barrelInputTimerR != 0) {
player->barrelInputTimerR--;
if (player->rollInputTimerR != 0) {
player->rollInputTimerR--;
}
if (player->timer_1E8 != 0) {
player->timer_1E8--;
if (player->rollTimer != 0) {
player->rollTimer--;
}
if (player->barrelRoll != 0) {
player->barrelInputTimerR = 0;
player->barrelInputTimerL = 0;
if (player->rollState != 0) {
player->rollInputTimerR = 0;
player->rollInputTimerL = 0;
player->zRotBarrelRoll += player->rollRate;
if (player->zRotBank > 0.0f) {
player->zRotBank -= 8.0f;
@@ -732,7 +732,7 @@ void func_tank_80045E7C(Player* player) {
player->zRotBank = 0.0f;
}
}
if (player->timer_1E8 == 0) {
if (player->rollTimer == 0) {
D_ctx_801779A8[player->num] = 25.0f;
if (player->rollRate > 0) {
player->rollRate -= 2;
@@ -741,11 +741,11 @@ void func_tank_80045E7C(Player* player) {
player->rollRate += 2;
}
if (player->rollRate == 0) {
player->barrelRoll = 0;
player->rollState = 0;
Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE);
}
}
if ((player->timer_1E8 >= 5) && (player->hitTimer == 0) && (player->barrelRoll != 9)) {
if ((player->rollTimer >= 5) && (player->hitTimer == 0) && (player->rollState != 9)) {
if (player->rollRate > 0) {
player->unk_170 = 1.3f;
}
@@ -809,13 +809,13 @@ void func_tank_80046358(Player* player) {
player->groundPos.x = player->pos.x;
player->groundPos.z = player->trueZpos + -20.0f;
player->groundPos.y = gGroundHeight + 3.0f;
player->unk_248 = 0.0f;
player->unk_24C = 0.0f;
player->shadowRotX = 0.0f;
player->shadowRotZ = 0.0f;
player->groundRotY = 0.0f;
Ground_801B6E20(player->groundPos.x, player->groundPos.z + player->zPath, &spD4, &spD0, &spCC);
player->groundPos.y = spD0 + 2.0f;
player->unk_248 = spD4;
player->unk_24C = spCC;
player->shadowRotX = spD4;
player->shadowRotZ = spCC;
}
void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
@@ -845,7 +845,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
if (D_MA_801BE250[27] < arg3 + sp58.y) {
D_MA_801BE250[27] = arg3 + sp58.y;
if (arg1 == OBJ_SCENERY_67) {
player->barrelRoll = 0;
player->rollState = 0;
D_800C9F04 = 1;
}
}
@@ -853,8 +853,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
D_MA_801BE250[29] = sp58.z;
} else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) &&
Play_CheckPolyCollision(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) {
player->barrelRoll = 9;
player->timer_1E8 = 15;
player->rollState = 9;
player->rollTimer = 15;
if ((arg6 > 90.0f) && (arg6 < 270.0f)) {
player->rollRate = player->baseRollRate = 20;
} else {
@@ -866,8 +866,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
D_800C9F10 = arg3 + sp58.y;
player->groundPos.x = player->pos.x;
player->groundPos.y = D_800C9F10 - 2.0f;
player->unk_248 = sp58.x;
player->unk_24C = sp58.z;
player->shadowRotX = sp58.x;
player->shadowRotZ = sp58.z;
}
}
@@ -956,8 +956,8 @@ void func_tank_80046704(Player* player) {
if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) &&
(scenery->obj.pos.x <= (player->pos.x + 210.0f))) &&
(D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) {
player->barrelRoll = 9;
player->timer_1E8 = 15;
player->rollState = 9;
player->rollTimer = 15;
if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) {
player->rollRate = player->baseRollRate = 20;
} else {
@@ -966,7 +966,7 @@ void func_tank_80046704(Player* player) {
} else {
D_800C9F04 = 1;
D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f;
player->barrelRoll = 0;
player->rollState = 0;
}
}
if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) &&
@@ -1106,7 +1106,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3
void Tank_UpdateOnRails(Player* player) {
s32 pad;
player->unk_204 = 1;
player->wingPosition = 1;
func_tank_80045130(player);
D_800C9F14 = 0;
func_tank_80045678(player);
@@ -1150,8 +1150,8 @@ void Tank_UpdateOnRails(Player* player) {
player->groundPos.x = player->pos.x;
player->groundPos.z = player->trueZpos + -10.0f;
player->groundPos.y = gGroundHeight - 4.0f;
player->unk_248 = 0.0f;
player->unk_24C = 0.0f;
player->shadowRotX = 0.0f;
player->shadowRotZ = 0.0f;
player->groundRotY = 0.0f;
func_tank_800481F4(player);
}
@@ -1271,9 +1271,9 @@ void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) {
Math_SmoothStepToF(&player->zRotBank, 30.0f, 0.5f, 20.0f, 0);
} else {
Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0);
if (player->barrelRoll == 0) {
player->barrelRoll = 9;
player->timer_1E8 = 15;
if (player->rollState == 0) {
player->rollState = 9;
player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20;
}
}
@@ -1282,9 +1282,9 @@ void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) {
Math_SmoothStepToF(&player->zRotBank, -30.0f, 0.5f, 20.0f, 0);
} else {
Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0);
if (player->barrelRoll == 0) {
player->barrelRoll = 9;
player->timer_1E8 = 15;
if (player->rollState == 0) {
player->rollState = 9;
player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20;
}
}
@@ -1340,7 +1340,7 @@ void func_tank_800481F4(Player* player) {
Player_UpdateHitbox(player);
func_tank_800444BC(player);
if (player->timer_498 == 0) {
if (player->mercyTimer == 0) {
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) &&
(scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) &&
@@ -1411,13 +1411,13 @@ void func_tank_800481F4(Player* player) {
0.0f, 0.0f) != 0) {
if (player->pos.x < actor->obj.pos.x) {
player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f;
player->barrelRoll = 8;
player->timer_1E8 = 15;
player->rollState = 8;
player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20;
} else {
player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f;
player->barrelRoll = 8;
player->timer_1E8 = 15;
player->rollState = 8;
player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20;
}
Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f);
@@ -1427,7 +1427,7 @@ void func_tank_800481F4(Player* player) {
player->pos.x = player->basePos.x;
actor->dmgType = DMG_COLLISION;
Player_ApplyDamage(player, 0, 5);
player->timer_498 = 1;
player->mercyTimer = 1;
}
} else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) {
if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x,
@@ -1438,13 +1438,13 @@ void func_tank_800481F4(Player* player) {
Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f);
if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) {
player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f;
player->barrelRoll = 8;
player->timer_1E8 = 15;
player->rollState = 8;
player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20;
} else {
player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f;
player->barrelRoll = 8;
player->timer_1E8 = 15;
player->rollState = 8;
player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20;
}
player->vel.x = 0.0f;
@@ -1489,7 +1489,7 @@ void func_tank_800481F4(Player* player) {
(sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
sprite->destroy = 1;
player->hitTimer = 6;
player->unk_21C = 0;
player->hitDirection = 0;
} else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) {
sprite->destroy = 1;
} else {
+402 -440
View File
File diff suppressed because it is too large Load Diff