mirror of
https://github.com/HarbourMasters/Starship
synced 2026-09-01 18:29:55 -04:00
use array count for collision headers (#222)
* lights fix * names * remove header * so many names * format * more docs * makefile * colheaders * it's gone too far * torch
This commit is contained in:
+13
-14
@@ -172,7 +172,7 @@ void AllRange_GreatFoxRepair(Player* player) {
|
||||
case 0:
|
||||
player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->boostMeter =
|
||||
player->boostCooldown = player->somersault = gCsFrameCount = 0;
|
||||
player->unk_130 = player->camRoll = player->unk_110 = player->unk_08C = player->unk_0D8.x =
|
||||
player->unk_130 = player->camRoll = player->boostSpeed = player->unk_08C = player->unk_0D8.x =
|
||||
player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f;
|
||||
gCsCamEyeX = 1673.0f;
|
||||
gCsCamEyeY = 337.0f;
|
||||
@@ -183,7 +183,7 @@ void AllRange_GreatFoxRepair(Player* player) {
|
||||
}
|
||||
player->unk_0E8 = 0.0f;
|
||||
player->pos.x = 2100.0f;
|
||||
player->unk_0D0 = 30.0f;
|
||||
player->baseSpeed = 30.0f;
|
||||
player->unk_0E4 = -8.0f;
|
||||
player->unk_114 = 90.0f;
|
||||
gCsCamAtX = 2100.0f;
|
||||
@@ -203,7 +203,7 @@ void AllRange_GreatFoxRepair(Player* player) {
|
||||
}
|
||||
if (gCsFrameCount >= 64) {
|
||||
player->unk_1D0++;
|
||||
player->unk_0D0 = 0.0f;
|
||||
player->baseSpeed = 0.0f;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@@ -234,7 +234,7 @@ void AllRange_GreatFoxRepair(Player* player) {
|
||||
if (gFillScreenAlpha == 0) {
|
||||
player->unk_190 = player->unk_194 = 5.0f;
|
||||
player->unk_114 = 90.0f;
|
||||
player->unk_0D0 = D_play_80161A54;
|
||||
player->baseSpeed = gArwingSpeed;
|
||||
player->unk_1D0++;
|
||||
|
||||
AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0);
|
||||
@@ -263,7 +263,7 @@ void AllRange_GreatFoxRepair(Player* player) {
|
||||
Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY);
|
||||
sp6C.x = 0.0f;
|
||||
sp6C.y = 0.0f;
|
||||
sp6C.z = player->unk_0D0;
|
||||
sp6C.z = player->baseSpeed;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp60);
|
||||
player->vel.x = sp60.x;
|
||||
player->vel.z = sp60.z;
|
||||
@@ -461,8 +461,7 @@ void ActorAllRange_SpawnStarWolf(void) {
|
||||
}
|
||||
|
||||
void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character) {
|
||||
if ((D_ctx_80178300 == 0) && (gActors[0].state == STATE360_2) &&
|
||||
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) {
|
||||
if ((gHideRadio == 0) && (gActors[0].state == STATE360_2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) {
|
||||
Radio_PlayMessage(msg, character);
|
||||
}
|
||||
}
|
||||
@@ -696,19 +695,19 @@ void ActorAllRange_UpdateEvents(Actor* this) {
|
||||
gAllRangeEventTimer++;
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_FORTUNA:
|
||||
Fortuna_80187960(this);
|
||||
Fortuna_UpdateEvents(this);
|
||||
break;
|
||||
case LEVEL_KATINA:
|
||||
Katina_80198594(this);
|
||||
Katina_UpdateEvents(this);
|
||||
break;
|
||||
case LEVEL_BOLSE:
|
||||
Bolse_UpdateEventHandler(this);
|
||||
break;
|
||||
case LEVEL_SECTOR_Z:
|
||||
SectorZ_8019AB8C(this);
|
||||
SectorZ_UpdateEvents(this);
|
||||
break;
|
||||
case LEVEL_VENOM_2:
|
||||
Venom2_80196314(this);
|
||||
Venom2_UpdateEvents(this);
|
||||
break;
|
||||
}
|
||||
ActorAllRange_SpawnSupplies(this);
|
||||
@@ -1491,11 +1490,11 @@ void ActorAllRange_Update(Actor* this) {
|
||||
this->fwork[4] = gPlayer[0].pos.x + spCC;
|
||||
this->fwork[5] = gPlayer[0].pos.y + spC8;
|
||||
this->fwork[6] = gPlayer[0].unk_138 + spC4;
|
||||
this->fwork[1] = gPlayer[0].unk_0D0 + 10.0f;
|
||||
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].unk_0D0 - 5.0f;
|
||||
this->fwork[1] = gPlayer[0].baseSpeed - 5.0f;
|
||||
this->iwork[11] = 2;
|
||||
} else if ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF)) {
|
||||
this->fwork[3] = 1.6f;
|
||||
@@ -1545,7 +1544,7 @@ void ActorAllRange_Update(Actor* this) {
|
||||
if (this->aiIndex != AI360_FOX) {
|
||||
this->fwork[1] = gActors[this->aiIndex].fwork[0] - 5.0f;
|
||||
} else {
|
||||
this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f;
|
||||
this->fwork[1] = gPlayer[0].baseSpeed - 5.0f;
|
||||
if ((gCurrentLevel == LEVEL_VENOM_2) &&
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN) && (gPlayer[0].unk_4D8 > 100.0f)) {
|
||||
this->iwork[16] = STATE360_8;
|
||||
|
||||
@@ -38,70 +38,70 @@ CollisionHeader D_800D2B38[10] = {
|
||||
{
|
||||
{ -1128.0f, -1835.0f, -1202.0f },
|
||||
{ 997.0f, 139.0f, 1360.0f },
|
||||
79,
|
||||
ARRAY_COUNT(D_ME_602FA9C),
|
||||
D_ME_602FA9C,
|
||||
D_ME_60300C8,
|
||||
},
|
||||
{
|
||||
{ -3006.0f, -2274.0f, -4530.0f },
|
||||
{ 3015.0f, 3348.0f, 5246.0f },
|
||||
236,
|
||||
ARRAY_COUNT(D_ME_60305DC),
|
||||
D_ME_60305DC,
|
||||
D_ME_603184C,
|
||||
},
|
||||
{
|
||||
{ -152.0f, -200.0f, -152.0f },
|
||||
{ 165.0f, 204.0f, 181.0f },
|
||||
42,
|
||||
ARRAY_COUNT(D_ME_6030208),
|
||||
D_ME_6030208,
|
||||
D_ME_6030550,
|
||||
},
|
||||
{
|
||||
{ -1704.0f, -1006.0f, -4751.0f },
|
||||
{ 1704.0f, 1030.0f, 4842.0f },
|
||||
174,
|
||||
ARRAY_COUNT(D_SY_6033070),
|
||||
D_SY_6033070,
|
||||
D_SY_6033E08,
|
||||
},
|
||||
{
|
||||
{ -1308.0f, 0.0f, -1460.0f },
|
||||
{ 1310.0f, 666.0f, 807.0f },
|
||||
93,
|
||||
ARRAY_COUNT(D_FO_600F60C),
|
||||
D_FO_600F60C,
|
||||
D_FO_600FD50,
|
||||
},
|
||||
{
|
||||
{ -951.0f, 0.0f, -1075.0f },
|
||||
{ 1075.0f, 1014.0f, 1075.0f },
|
||||
22,
|
||||
ARRAY_COUNT(D_FO_600F3F4),
|
||||
D_FO_600F3F4,
|
||||
D_FO_600F5AC,
|
||||
},
|
||||
{
|
||||
{ -951.0f, 0.0f, -1075.0f },
|
||||
{ 1075.0f, 384.0f, 1075.0f },
|
||||
22,
|
||||
ARRAY_COUNT(D_FO_600F1DC),
|
||||
D_FO_600F1DC,
|
||||
D_FO_600F394,
|
||||
},
|
||||
{
|
||||
{ -1554.0f, -2.0f, -1401.0f },
|
||||
{ 1554.0f, 590.0f, 1401.0f },
|
||||
262,
|
||||
ARRAY_COUNT(D_BO_6010294),
|
||||
D_BO_6010294,
|
||||
D_BO_601170C,
|
||||
},
|
||||
{
|
||||
{ -1386.0f, -696.0f, -2274.0f },
|
||||
{ 1386.0f, 1033.0f, 1833.0f },
|
||||
316,
|
||||
ARRAY_COUNT(D_SZ_6007558),
|
||||
D_SZ_6007558,
|
||||
D_SZ_6008E08,
|
||||
},
|
||||
{
|
||||
{ -671.0f, 0.0f, -671.0f },
|
||||
{ 671.0f, 648.0f, 671.0f },
|
||||
250,
|
||||
ARRAY_COUNT(D_VE2_6014FEC),
|
||||
D_VE2_6014FEC,
|
||||
D_VE2_6016374,
|
||||
},
|
||||
@@ -118,14 +118,14 @@ CollisionHeader2 D_800D2CA0[19] = {
|
||||
{
|
||||
{ -1220.0f, 0.0f, -1315.0f },
|
||||
{ 1403.0f, 174.0f, 1308.0f },
|
||||
13,
|
||||
ARRAY_COUNT(D_CO_603F338),
|
||||
D_CO_603F338,
|
||||
D_CO_603F388,
|
||||
},
|
||||
{
|
||||
{ -1311.0f, 0.0f, -1120.0f },
|
||||
{ 1266.0f, 1465.0f, 1266.0f },
|
||||
36,
|
||||
ARRAY_COUNT(D_CO_603F40C),
|
||||
D_CO_603F40C,
|
||||
D_CO_603F4E4,
|
||||
},
|
||||
@@ -139,105 +139,105 @@ CollisionHeader2 D_800D2CA0[19] = {
|
||||
{
|
||||
{ -498.0f, -10.0f, -498.0f },
|
||||
{ 498.0f, 705.0f, 498.0f },
|
||||
4,
|
||||
ARRAY_COUNT(D_versus_302EEE8),
|
||||
D_versus_302EEE8,
|
||||
D_versus_302EF00,
|
||||
},
|
||||
{
|
||||
{ -1494.0f, -30.0f, -1494.0f },
|
||||
{ 1494.0f, 2115.0f, 1494.0f },
|
||||
4,
|
||||
ARRAY_COUNT(D_versus_302EF6C),
|
||||
D_versus_302EF6C,
|
||||
D_versus_302EF84,
|
||||
},
|
||||
{
|
||||
{ -623.0f, -10.0f, -623.0f },
|
||||
{ 623.0f, 200.0f, 623.0f },
|
||||
4,
|
||||
ARRAY_COUNT(D_versus_302EFF0),
|
||||
D_versus_302EFF0,
|
||||
D_versus_302F008,
|
||||
},
|
||||
{
|
||||
{ -488.0f, 0.0f, -568.0f },
|
||||
{ 488.0f, 148.0f, 567.0f },
|
||||
30,
|
||||
ARRAY_COUNT(D_ZO_602CACC),
|
||||
D_ZO_602CACC,
|
||||
D_ZO_602CB80,
|
||||
},
|
||||
{
|
||||
{ -900.0f, -110.0f, -1900.0f },
|
||||
{ 900.0f, 190.0f, 100.0f },
|
||||
2,
|
||||
ARRAY_COUNT(D_MA_6030E74),
|
||||
D_MA_6030E74,
|
||||
D_MA_6030E80,
|
||||
},
|
||||
{
|
||||
{ -900.0f, -100.0f, -1000.0f },
|
||||
{ 900.0f, 250.0f, 100.0f },
|
||||
2,
|
||||
ARRAY_COUNT(D_MA_6030EB0),
|
||||
D_MA_6030EB0,
|
||||
D_MA_6030EBC,
|
||||
},
|
||||
{
|
||||
{ -900.0f, -190.0f, -1900.0f },
|
||||
{ 900.0f, 100.0f, 100.0f },
|
||||
2,
|
||||
ARRAY_COUNT(D_MA_6030EEC),
|
||||
D_MA_6030EEC,
|
||||
D_MA_6030EF8,
|
||||
},
|
||||
{
|
||||
{ -500.0f, -250.0f, -1010.0f },
|
||||
{ 500.0f, 100.0f, 100.0f },
|
||||
2,
|
||||
ARRAY_COUNT(D_MA_6030F28),
|
||||
D_MA_6030F28,
|
||||
D_MA_6030F34,
|
||||
},
|
||||
{
|
||||
{ -1200.0f, 0.0f, -1800.0f },
|
||||
{ 0.0f, 900.0f, 1500.0f },
|
||||
4,
|
||||
ARRAY_COUNT(D_MA_6030F64),
|
||||
D_MA_6030F64,
|
||||
D_MA_6030F7C,
|
||||
},
|
||||
{
|
||||
{ -400.0f, 0.0f, -900.0f },
|
||||
{ 400.0f, 0.0f, 0.0f },
|
||||
2,
|
||||
ARRAY_COUNT(D_MA_6030FC4),
|
||||
D_MA_6030FC4,
|
||||
D_MA_6030FD0,
|
||||
},
|
||||
{
|
||||
{ -74.0f, 0.0f, -84.0f },
|
||||
{ 74.0f, 125.0f, 84.0f },
|
||||
30,
|
||||
ARRAY_COUNT(D_AQ_60320B8),
|
||||
D_AQ_60320B8,
|
||||
D_AQ_603216C,
|
||||
},
|
||||
{
|
||||
{ -1200.0f, 0.0f, -1315.0f },
|
||||
{ 1403.0f, 200.0f, 1308.0f },
|
||||
8,
|
||||
ARRAY_COUNT(D_AQ_6031FB0),
|
||||
D_AQ_6031FB0,
|
||||
D_AQ_6031FE0,
|
||||
},
|
||||
{
|
||||
{ -600.0f, 0.0f, -657.0f },
|
||||
{ 701.0f, 100.0f, 654.0f },
|
||||
8,
|
||||
ARRAY_COUNT(D_AQ_6031FB0),
|
||||
D_AQ_6031FB0,
|
||||
D_AQ_603204C,
|
||||
},
|
||||
{
|
||||
{ -2965.0f, -16.0f, -2965.0f },
|
||||
{ 2965.0f, 544.0f, 2965.0f },
|
||||
14,
|
||||
ARRAY_COUNT(D_versus_302F044),
|
||||
D_versus_302F044,
|
||||
D_versus_302F098,
|
||||
},
|
||||
{
|
||||
{ -814.0f, 0.0f, -691.0f },
|
||||
{ 814.0f, 752.0f, 691.0f },
|
||||
28,
|
||||
ARRAY_COUNT(D_AQ_6032388),
|
||||
D_AQ_6032388,
|
||||
D_AQ_6032430,
|
||||
},
|
||||
|
||||
+11
-11
@@ -60,7 +60,7 @@ void func_beam_80035E78(PlayerShot* shot) {
|
||||
gScreenFlashTimer = 4;
|
||||
if (shot->obj.pos.y < (gGroundHeight + 450.0f)) {
|
||||
gCameraShake = 15;
|
||||
if (gGroundType == GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface == SURFACE_WATER) {
|
||||
func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f,
|
||||
shot->unk_48 * 3.0f, 0);
|
||||
func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f,
|
||||
@@ -184,7 +184,7 @@ void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 ar
|
||||
s32 unk44, s32 time) {
|
||||
s32 i;
|
||||
|
||||
if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType != GROUNDTYPE_WATER) &&
|
||||
if ((gGroundType != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundSurface != SURFACE_WATER) &&
|
||||
(gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_BOLSE) && (gCurrentLevel != LEVEL_TRAINING) &&
|
||||
(gCurrentLevel != LEVEL_ZONESS)) {
|
||||
for (i = 0; i < 50; i++) {
|
||||
@@ -213,7 +213,7 @@ void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot,
|
||||
void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
|
||||
s32 i;
|
||||
|
||||
if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType <= GROUNDTYPE_GRASS) &&
|
||||
if ((gGroundType != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundSurface <= SURFACE_GRASS) &&
|
||||
(gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) {
|
||||
for (i = 0; i < 50; i++) {
|
||||
if (gEffects[i].obj.status == OBJ_FREE) {
|
||||
@@ -885,7 +885,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((D_ctx_801784AC == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20)) {
|
||||
if ((gGroundType == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20)) {
|
||||
func_beam_80036318(shot);
|
||||
if (shot->obj.id != PLAYERSHOT_4) {
|
||||
func_effect_8007A900(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 2.0f, 255, 15, 0);
|
||||
@@ -1515,11 +1515,11 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) {
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
sp5C.x = 0.0f;
|
||||
sp5C.y = 0.0f;
|
||||
sp5C.z = player->unk_0D0 + 200.0f;
|
||||
sp5C.z = player->baseSpeed + 200.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50);
|
||||
shot->vel.x = sp50.x;
|
||||
shot->vel.y = sp50.y;
|
||||
shot->vel.z = sp50.z - player->unk_110;
|
||||
shot->vel.z = sp50.z - player->boostSpeed;
|
||||
sp5C.x = shot->unk_54;
|
||||
sp5C.y = -15.0f;
|
||||
sp5C.z = 0.0f;
|
||||
@@ -1600,11 +1600,11 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
|
||||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) {
|
||||
if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) {
|
||||
func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f);
|
||||
func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f);
|
||||
}
|
||||
if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) {
|
||||
if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) {
|
||||
func_beam_80036318(shot);
|
||||
shot->obj.pos.y = gGroundHeight + 2;
|
||||
if (gCurrentLevel == LEVEL_BOLSE) {
|
||||
@@ -1629,7 +1629,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
|
||||
func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f);
|
||||
}
|
||||
}
|
||||
if (gGroundType == GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface == SURFACE_WATER) {
|
||||
Object_Kill(&shot->obj, shot->sfxSource);
|
||||
return;
|
||||
}
|
||||
@@ -2002,7 +2002,7 @@ void func_beam_8003CC08(PlayerShot* shot) {
|
||||
func_beam_80035E78(shot);
|
||||
break;
|
||||
}
|
||||
if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) {
|
||||
if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) {
|
||||
func_beam_80035E78(shot);
|
||||
break;
|
||||
}
|
||||
@@ -2075,7 +2075,7 @@ void func_beam_8003CF90(PlayerShot* shot) {
|
||||
Player* player;
|
||||
|
||||
if ((shot->obj.pos.y < gGroundHeight) || (shot->unk_64 == 1)) {
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundHeight)) {
|
||||
if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < gGroundHeight)) {
|
||||
shot->unk_48 = 10.0f;
|
||||
func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f,
|
||||
shot->unk_48 * 3.0f, 0);
|
||||
|
||||
+8
-8
@@ -810,7 +810,7 @@ void Background_DrawLensFlare(void) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
|
||||
void func_bg_80040CDC(void) {
|
||||
void Background_dummy_80040CDC(void) {
|
||||
}
|
||||
|
||||
void Background_DrawGround(void) {
|
||||
@@ -829,10 +829,10 @@ void Background_DrawGround(void) {
|
||||
return;
|
||||
}
|
||||
sp1D4 = 0.0f;
|
||||
if ((D_ctx_801784AC != 10) && (D_ctx_801784AC != 11)) {
|
||||
if ((gGroundType != 10) && (gGroundType != 11)) {
|
||||
sp1D4 = -4000.0f;
|
||||
}
|
||||
if (D_ctx_801784AC == 7) {
|
||||
if (gGroundType == 7) {
|
||||
sp1D4 = 0.0f;
|
||||
gPlayer[gPlayerNum].unk_0AC = 0.0f;
|
||||
}
|
||||
@@ -897,16 +897,16 @@ void Background_DrawGround(void) {
|
||||
temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f);
|
||||
gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
switch (gGroundType) {
|
||||
case GROUNDTYPE_GRASS:
|
||||
switch (gGroundSurface) {
|
||||
case SURFACE_GRASS:
|
||||
gDPLoadTileTexture(gMasterDisp++, D_CO_601B6C0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32);
|
||||
gBgColor = 0x845; // 8, 8, 32
|
||||
break;
|
||||
case GROUNDTYPE_ROCK:
|
||||
case SURFACE_ROCK:
|
||||
gDPLoadTileTexture(gMasterDisp++, D_CO_6028260, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32);
|
||||
gBgColor = 0x845; // 8, 8, 32
|
||||
break;
|
||||
case GROUNDTYPE_WATER:
|
||||
case SURFACE_WATER:
|
||||
RCP_SetupDL_45(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
|
||||
gDPLoadTileTexture(gMasterDisp++, D_CO_6028A60, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32);
|
||||
@@ -924,7 +924,7 @@ void Background_DrawGround(void) {
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_601B640);
|
||||
} else {
|
||||
gGroundType = GROUNDTYPE_GRASS;
|
||||
gGroundSurface = SURFACE_GRASS;
|
||||
gBgColor = 0x845; // 8, 8, 32
|
||||
for (i = 0; i < 4; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
||||
@@ -13,7 +13,7 @@ s32 PAD_boss_C9EC4[14] = { 0 };
|
||||
|
||||
const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f };
|
||||
|
||||
void func_boss_80042EC0(Boss* boss) {
|
||||
void Boss_AwardBonus(Boss* boss) {
|
||||
s32 bonus;
|
||||
f32 yOffset;
|
||||
|
||||
@@ -59,7 +59,7 @@ void Boss300_Update(Boss300* this) {
|
||||
void Boss300_Draw(Boss300* this) {
|
||||
}
|
||||
|
||||
void func_boss_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,
|
||||
void Boss_SetupActor189(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,
|
||||
f32 arg9, f32 argA, s32 argB, s32 argC) {
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_INIT;
|
||||
@@ -83,13 +83,13 @@ void func_boss_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f3
|
||||
}
|
||||
}
|
||||
|
||||
void func_boss_800430DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,
|
||||
void Boss_SpawnActor189(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,
|
||||
f32 arg9, s32 argA, s32 argB) {
|
||||
s32 i;
|
||||
|
||||
for (i = 59; i >= 0; i--) {
|
||||
if (gActors[i].obj.status == OBJ_FREE) {
|
||||
func_boss_80042FF4(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB);
|
||||
Boss_SetupActor189(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -99,14 +99,14 @@ void func_boss_80043188(Boss* boss) {
|
||||
boss->info.unk_10 = 30000.0f;
|
||||
}
|
||||
|
||||
void func_boss_8004319C(Player* player, f32 arg1, f32 arg2, f32 arg3) {
|
||||
void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) {
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80);
|
||||
|
||||
gCsFrameCount = 0;
|
||||
D_ctx_80178448 = arg3 + D_ctx_80177D20;
|
||||
D_ctx_80178440 = arg1;
|
||||
D_ctx_80178444 = arg2;
|
||||
D_ctx_80178448 = zPos + D_ctx_80177D20;
|
||||
D_ctx_80178440 = xPos;
|
||||
D_ctx_80178444 = yPos;
|
||||
|
||||
player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
|
||||
player->unk_1D0 = 10;
|
||||
|
||||
+71
-63
@@ -42,9 +42,9 @@ s32 gCsFrameCount;
|
||||
u8 D_ctx_80177A98;
|
||||
u8 D_ctx_80177AB0;
|
||||
u8 gAqDrawMode;
|
||||
s32 D_ctx_80177AE0;
|
||||
s32 gTitleState;
|
||||
s32 gMainController;
|
||||
s32 D_ctx_80177B40;
|
||||
s32 gMapState;
|
||||
s32 gMissionNumber;
|
||||
s32 gMissionTeamStatus[7];
|
||||
s32 gMissionHitCount[7];
|
||||
@@ -61,22 +61,22 @@ u8 gOptionSoundMode;
|
||||
s32 gVolumeSettings[3];
|
||||
u16 gBgmSeqId;
|
||||
u8 gLevelType;
|
||||
s32 D_ctx_80177CA0;
|
||||
s32 gSavedObjectLoadIndex;
|
||||
UNK_TYPE F_80177CA8;
|
||||
f32 D_ctx_80177CB0;
|
||||
UNK_TYPE F_80177CB8;
|
||||
f32 D_ctx_80177CC0;
|
||||
f32 gWaterLevel;
|
||||
f32 D_ctx_80177CC8;
|
||||
f32 D_ctx_80177CE8;
|
||||
f32 D_ctx_80177D08;
|
||||
f32 D_ctx_80177D20;
|
||||
f32 D_ctx_80177D38;
|
||||
f32 D_ctx_80177D50;
|
||||
f32 D_ctx_80177D68;
|
||||
f32 gRadioPortraitScaleY;
|
||||
f32 gRadioTextBoxScaleY;
|
||||
f32 gRadioMsgRadioId;
|
||||
UNK_TYPE F_80177D80;
|
||||
UNK_TYPE F_80177DE8;
|
||||
s32 gGameFrameCount;
|
||||
s32 D_ctx_80177DC8;
|
||||
s32 gObjectLoadIndex;
|
||||
s32 gPrevEventActorIndex;
|
||||
s32 D_ctx_80177E78;
|
||||
s32 gRingPassCount;
|
||||
@@ -90,22 +90,22 @@ s32 gBossActive;
|
||||
s32 D_ctx_8017828C;
|
||||
s32 D_ctx_80178294;
|
||||
s32 gRadioState;
|
||||
s32 D_ctx_801782A4;
|
||||
s32 D_Timer_801782AC;
|
||||
s32 D_Timer_801782B4;
|
||||
s32 gCurrentRadioPortrait;
|
||||
s32 gRadioStateTimer;
|
||||
s32 gRadioMouthTimer;
|
||||
u8 gLeveLClearStatus[30] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
s32 D_ctx_801782C0;
|
||||
s32 D_ctx_801782C8;
|
||||
s32 D_ctx_801782D0;
|
||||
s32 D_ctx_801782D8;
|
||||
s32 gRadioMsgCharIndex;
|
||||
UNK_TYPE F_801782E0;
|
||||
s32 D_ctx_801782E8;
|
||||
s32 gRadioMsgId;
|
||||
UNK_TYPE F_801782F0;
|
||||
s32 D_ctx_801782F8;
|
||||
s32 D_ctx_80178300;
|
||||
u16* D_ctx_80178308;
|
||||
s32 gMsgCharIsPrinting;
|
||||
s32 gHideRadio;
|
||||
u16* gRadioMsg;
|
||||
ObjectInit* gLevelObjects;
|
||||
UNK_TYPE F_80178318;
|
||||
s32 gFogRed;
|
||||
@@ -147,6 +147,7 @@ UNK_TYPE F_80178400;
|
||||
UNK_TYPE F_80178404;
|
||||
UNK_TYPE F_80178408;
|
||||
UNK_TYPE F_8017840C;
|
||||
UNK_TYPE P_800D31A0 = 0;
|
||||
s32 gStarCount;
|
||||
f32 gStarWarpDistortion;
|
||||
f32 D_ctx_80178418;
|
||||
@@ -162,12 +163,12 @@ UNK_TYPE F_8017843C;
|
||||
f32 D_ctx_80178440;
|
||||
f32 D_ctx_80178444;
|
||||
f32 D_ctx_80178448;
|
||||
f32 D_ctx_80178450[3];
|
||||
f32 D_ctx_80178460[3];
|
||||
f32 D_ctx_80178470[3];
|
||||
f32 D_ctx_80178450[3]; // x positions of certain actors (teammates?)
|
||||
f32 D_ctx_80178460[3]; // y positions of certain actors (teammates?)
|
||||
f32 D_ctx_80178470[3]; // z positions of certain actors (teammates?)
|
||||
f32 gCameraShakeY;
|
||||
s32 gCameraShake;
|
||||
s32 D_ctx_80178484;
|
||||
s32 D_ctx_80178484; // set to 10000 but not used
|
||||
bool gLoadLevelObjects;
|
||||
UNK_TYPE F_8017848C;
|
||||
UNK_TYPE F_80178490;
|
||||
@@ -177,46 +178,53 @@ f32 D_ctx_8017849C;
|
||||
f32 D_ctx_801784A0;
|
||||
s32 D_ctx_801784A4;
|
||||
UNK_TYPE F_801784A8;
|
||||
s32 D_ctx_801784AC;
|
||||
GroundType gGroundType;
|
||||
UNK_TYPE F_801784B0;
|
||||
UNK_TYPE F_801784B4;
|
||||
f32 D_ctx_801784B8; // effective Vec3f
|
||||
f32 D_ctx_801784BC;
|
||||
f32 D_ctx_801784C0;
|
||||
f32 D_ctx_801784C4; // effective Vec3f
|
||||
f32 D_ctx_801784C8;
|
||||
f32 D_ctx_801784CC;
|
||||
f32 D_ctx_801784D0; // effective Vec3f
|
||||
f32 D_ctx_801784D4;
|
||||
f32 D_ctx_801784D8;
|
||||
s32 gLight1x; // Vec3i light direction
|
||||
|
||||
// light source 1
|
||||
f32 gLight1xRot; // effective Vec3f
|
||||
f32 gLight1yRot;
|
||||
f32 gLight1zRot;
|
||||
f32 gLight1xRotTarget; // effective Vec3f
|
||||
f32 gLight1yRotTarget;
|
||||
f32 gLight1zRotTarget;
|
||||
f32 gEnvLightxRot; // effective Vec3f
|
||||
f32 gEnvLightyRot;
|
||||
f32 gEnvLightzRot;
|
||||
s32 gLight1x; // Vec3i?
|
||||
s32 gLight1y;
|
||||
s32 gLight1z;
|
||||
f32 D_ctx_801784E8;
|
||||
f32 D_ctx_801784EC; // effective Vec3f?
|
||||
f32 D_ctx_801784F0;
|
||||
f32 D_ctx_801784F4;
|
||||
f32 D_ctx_801784F8; // effective Vec3f
|
||||
f32 D_ctx_801784FC;
|
||||
f32 D_ctx_80178500;
|
||||
s32 gLight2x; // Vec3i light direction alternate
|
||||
f32 gLight1rotStep;
|
||||
|
||||
// light source 2
|
||||
f32 gLight2xRot; // effective Vec3f
|
||||
f32 gLight2yRot;
|
||||
f32 gLight2zRot;
|
||||
f32 gLight2xRotTarget; // effective Vec3f
|
||||
f32 gLight2yRotTarget;
|
||||
f32 gLight2zRotTarget;
|
||||
s32 gLight2x; // Vec3i?
|
||||
s32 gLight2y;
|
||||
s32 gLight2z;
|
||||
f32 D_ctx_80178510;
|
||||
f32 gLight2rotStep;
|
||||
|
||||
// this section looks like a third light source
|
||||
UNK_TYPE F_801784514;
|
||||
UNK_TYPE F_801784518;
|
||||
UNK_TYPE F_80178451C;
|
||||
f32 D_ctx_80178520; // effective Vec3f
|
||||
f32 D_ctx_80178520; // effective Vec3f, set to env light rotation but unused
|
||||
f32 D_ctx_80178524;
|
||||
f32 D_ctx_80178528;
|
||||
UNK_TYPE F_80178452C;
|
||||
UNK_TYPE F_801784530;
|
||||
UNK_TYPE F_801784534;
|
||||
f32 D_ctx_80178538;
|
||||
f32 D_ctx_8017853C;
|
||||
s32 D_ctx_80178540;
|
||||
s32 D_ctx_80178544;
|
||||
s32 gLight1R; // Color32 light color 1
|
||||
|
||||
f32 D_ctx_8017853C; // hitbox size modifier. always 0.0f. seems out of place
|
||||
s32 gLight2colorStep; // light 2 color step
|
||||
s32 D_ctx_80178544; // light 3 color step?
|
||||
s32 gLight1R; // Color32 light color 1
|
||||
s32 gLight1G;
|
||||
s32 gLight1B;
|
||||
s32 gAmbientR; // Color32 ambient color
|
||||
@@ -226,18 +234,18 @@ UNK_TYPE F_80178560;
|
||||
s32 gLight2R; // Color32 light color 2
|
||||
s32 gLight2G;
|
||||
s32 gLight2B;
|
||||
UNK_TYPE P_800D31A0 = 0;
|
||||
s32 D_ctx_80178570; // Color32 light color 2 modifier?
|
||||
s32 D_ctx_80178574;
|
||||
s32 D_ctx_80178578;
|
||||
s32 D_ctx_80161A70; // Color32? start of bss
|
||||
s32 gLight2RTarget; // Color32 light color 2 modifier?
|
||||
s32 gLight2GTarget;
|
||||
s32 gLight2BTarget;
|
||||
|
||||
s32 D_ctx_80161A70; // Color32 set but not used, start of bss
|
||||
s32 D_ctx_80161A74;
|
||||
s32 D_ctx_80161A78;
|
||||
s32 D_ctx_80161A7C;
|
||||
s32 D_ctx_80161A7C; // Color32? set but not used
|
||||
s32 D_ctx_80161A80;
|
||||
s32 D_ctx_80161A84;
|
||||
s32 gGroundType;
|
||||
s32 gSavedGroundType;
|
||||
GroundSurface gGroundSurface;
|
||||
GroundSurface gSavedGroundSurface;
|
||||
u8 gGoldRingCount[4];
|
||||
u8 D_ctx_80161A94[4];
|
||||
s32 gHitCount;
|
||||
@@ -278,20 +286,20 @@ s32 D_ctx_80177858[4]; // set to 3 but never used
|
||||
PlayerForm gPlayerForms[4];
|
||||
s32 gHandicap[4];
|
||||
VsStage gVersusStage;
|
||||
s32 D_ctx_801778A4;
|
||||
s32 D_ctx_801778AC;
|
||||
s32 D_ctx_801778C8;
|
||||
s32 gVsPointsToWin;
|
||||
s32 gVsMatchType;
|
||||
s32 gVsTimeTrialLimit;
|
||||
bool gVersusMode;
|
||||
u16 gBoostButton[4];
|
||||
u16 gBrakeButton[4];
|
||||
u16 gShootButton[4];
|
||||
u16 gBombButton[4];
|
||||
f32 D_ctx_80177958[4]; // set to 1.0f but never used
|
||||
s32 D_ctx_8017796C;
|
||||
s32 gTeamLowHealthMsgTimer;
|
||||
OSContPad* gInputHold;
|
||||
OSContPad* gInputPress;
|
||||
u8* gControllerRumble;
|
||||
s32 D_ctx_80177990[4];
|
||||
s32 D_ctx_80177990[4]; // these two are also rumble related
|
||||
f32 D_ctx_801779A8[4];
|
||||
u8 gPauseEnabled;
|
||||
s32 gChargeTimers[4];
|
||||
@@ -328,10 +336,10 @@ s32 gStarWolfTeamAlive[6];
|
||||
s32 gSavedStarWolfTeamAlive[6];
|
||||
s32 gRightWingHealth[4];
|
||||
s32 gLeftWingHealth[4];
|
||||
s32 D_ctx_80177D40[4];
|
||||
s32 D_ctx_80177D58[4];
|
||||
s32 D_ctx_80177D70[4];
|
||||
s32 D_ctx_80177D88[4];
|
||||
s32 gRightWingFlashTimer[4];
|
||||
s32 gLeftWingFlashTimer[4];
|
||||
s32 gRightWingDebrisTimer[4];
|
||||
s32 gLeftWingDebrisTimer[4];
|
||||
s32 gBombCount[4];
|
||||
s32 D_ctx_80177DB8[4];
|
||||
s32 D_ctx_80177DD0[4][10];
|
||||
@@ -339,7 +347,7 @@ s32 D_ctx_80177E74;
|
||||
s32 D_ctx_80177E7C;
|
||||
s32 gChangeTo360;
|
||||
Vec3f gTeamArrowsViewPos[10];
|
||||
f32 D_ctx_80177F20[65];
|
||||
f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark
|
||||
f32 D_ctx_80178028[65];
|
||||
f32 D_ctx_80178130[65];
|
||||
u8 D_ctx_80178238[65];
|
||||
|
||||
+25
-25
@@ -200,7 +200,7 @@ void Cutscene_WarpZoneComplete(Player* player) {
|
||||
Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
|
||||
switch (player->unk_1D0) {
|
||||
case 0:
|
||||
@@ -217,7 +217,7 @@ void Cutscene_WarpZoneComplete(Player* player) {
|
||||
D_ctx_80177A48[1] -= D_ctx_80177A48[2];
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[2], 1.2f, 0.1f, 0.01f, 0.0f);
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 0.1f, 0.002f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_0D0, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY);
|
||||
sp5C.x = 0.0f;
|
||||
@@ -275,7 +275,7 @@ void Cutscene_WarpZoneComplete(Player* player) {
|
||||
}
|
||||
if (gCsFrameCount > 450) {
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.004f, 0.0f);
|
||||
player->unk_0D0 += 2.0f;
|
||||
player->baseSpeed += 2.0f;
|
||||
player->unk_0E4 += 0.1f;
|
||||
player->unk_190 = 2.0f;
|
||||
|
||||
@@ -319,7 +319,7 @@ void Cutscene_WarpZoneComplete(Player* player) {
|
||||
|
||||
sp5C.x = 0.0f;
|
||||
sp5C.y = 0.0f;
|
||||
sp5C.z = player->unk_0D0 + player->unk_110;
|
||||
sp5C.z = player->baseSpeed + player->boostSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50);
|
||||
player->vel.x = sp50.x;
|
||||
@@ -388,7 +388,7 @@ void func_demo_80049630(Actor* actor) {
|
||||
}
|
||||
|
||||
void func_demo_8004990C(Player* player) {
|
||||
if (D_ctx_801784AC == 0) {
|
||||
if (gGroundType == 0) {
|
||||
D_ctx_80177CE8 += 60.0f;
|
||||
}
|
||||
player->unk_138 = player->pos.z + player->unk_08C;
|
||||
@@ -527,7 +527,7 @@ void Cutscene_EnterWarpZone(Player* player) {
|
||||
}
|
||||
|
||||
player->unk_08C += player->unk_0CC;
|
||||
player->unk_0CC = player->unk_0CC - 100.0f;
|
||||
player->unk_0CC -= 100.0f;
|
||||
|
||||
if (player->unk_08C < -15000.0f) {
|
||||
player->unk_08C = 0.0f;
|
||||
@@ -583,7 +583,7 @@ void Cutscene_EnterWarpZone(Player* player) {
|
||||
player->vel.z = player->unk_144 = D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0 =
|
||||
D_ctx_80177D20 = 0.0f;
|
||||
|
||||
player->timer_27C = gSavedHitCount = D_ctx_80177DC8 = D_ctx_80177CA0 = 0;
|
||||
player->timer_27C = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0;
|
||||
|
||||
player->unk_234 = 1;
|
||||
gLevelPhase = 1;
|
||||
@@ -833,7 +833,7 @@ void Cutscene_AllRangeMode(Player* player) {
|
||||
Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
|
||||
switch (player->unk_1D0) {
|
||||
@@ -925,7 +925,7 @@ void Cutscene_AllRangeMode(Player* player) {
|
||||
|
||||
sp70.x = 0.0f;
|
||||
sp70.y = 0.0f;
|
||||
sp70.z = player->unk_0D0 + player->unk_110;
|
||||
sp70.z = player->baseSpeed + player->boostSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64);
|
||||
|
||||
@@ -971,9 +971,9 @@ void Cutscene_CoComplete2(Player* player) {
|
||||
player->wings.unk_10 = 0.0f;
|
||||
player->unk_130 = 0.0f;
|
||||
player->unk_12C = 0.0f;
|
||||
player->unk_110 = 0.0f;
|
||||
player->boostSpeed = 0.0f;
|
||||
player->wings.modelId = 1;
|
||||
player->unk_0D0 = 40.0f;
|
||||
player->baseSpeed = 40.0f;
|
||||
/* fallthrough */
|
||||
|
||||
case 11:
|
||||
@@ -1099,7 +1099,7 @@ void Cutscene_CoComplete2(Player* player) {
|
||||
}
|
||||
|
||||
if ((180.0f - fabsf(player->unk_0EC)) <= 3.0f) {
|
||||
gGroundType = GROUNDTYPE_ROCK;
|
||||
gGroundSurface = SURFACE_ROCK;
|
||||
}
|
||||
|
||||
if (player->timer_1F8 == 0) {
|
||||
@@ -1107,7 +1107,7 @@ void Cutscene_CoComplete2(Player* player) {
|
||||
player->timer_1FC = 500;
|
||||
player->unk_1D0 = 2;
|
||||
player->unk_000 = (player->unk_004 = (player->unk_008 = (D_ctx_80178418 = 0.0f)));
|
||||
player->unk_0D0 = 0.0f;
|
||||
player->baseSpeed = 0.0f;
|
||||
D_ctx_80177A48[6] = 0.0f;
|
||||
}
|
||||
break;
|
||||
@@ -1169,7 +1169,7 @@ void Cutscene_CoComplete2(Player* player) {
|
||||
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
|
||||
func_demo_8004A840(2);
|
||||
}
|
||||
gGroundType = GROUNDTYPE_GRASS;
|
||||
gGroundSurface = SURFACE_GRASS;
|
||||
}
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW);
|
||||
@@ -1265,13 +1265,13 @@ void Cutscene_CoComplete2(Player* player) {
|
||||
player->unk_25C = 0.6f;
|
||||
}
|
||||
player->unk_000 += 1.0f;
|
||||
player->unk_0D0 = player->unk_000 * player->unk_000;
|
||||
player->baseSpeed = SQ(player->unk_000);
|
||||
if (player->timer_1F8 == 0) {
|
||||
D_ctx_80177A48[7] = player->vel.x;
|
||||
D_ctx_80177A48[8] = player->vel.y;
|
||||
D_ctx_80177A48[9] = player->vel.z;
|
||||
player->unk_1D0 = 5;
|
||||
player->unk_0D0 = 0.0f;
|
||||
player->baseSpeed = 0.0f;
|
||||
player->timer_1F8 = 10;
|
||||
func_effect_80078E50(player->pos.x, player->pos.y, player->unk_138, 30.0f);
|
||||
}
|
||||
@@ -1318,7 +1318,7 @@ void Cutscene_CoComplete2(Player* player) {
|
||||
|
||||
sp60.x = 0.0f;
|
||||
sp60.y = 0.0f;
|
||||
sp60.z = player->unk_0D0;
|
||||
sp60.z = player->baseSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54);
|
||||
|
||||
@@ -1451,7 +1451,7 @@ void Cutscene_UTurn(Player* player) {
|
||||
Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.y, player->pos.y - 20.0f, 0.2f, 100.0f, 0.0f);
|
||||
|
||||
sp50.rot.z = player->unk_0D0;
|
||||
sp50.rot.z = player->baseSpeed;
|
||||
sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138));
|
||||
|
||||
player->boostCooldown = 1;
|
||||
@@ -1656,7 +1656,7 @@ void Cutscene_KillPlayer(Player* player) {
|
||||
if (player->unk_288 > 0) {
|
||||
D_ctx_80177DD0[player->unk_288 - 1][D_ctx_80177DB8[player->unk_288 - 1]] = player->num;
|
||||
D_ctx_80177DB8[player->unk_288 - 1] += 1;
|
||||
if (D_ctx_801778A4 == D_ctx_80177DB8[player->unk_288 - 1]) {
|
||||
if (gVsPointsToWin == D_ctx_80177DB8[player->unk_288 - 1]) {
|
||||
player->unk_288 = -1;
|
||||
if (player->unk_284 == 0) {
|
||||
func_effect_8007C688(player->pos.x, player->pos.y, player->unk_138, 3.0f, 1000);
|
||||
@@ -1736,17 +1736,17 @@ void func_demo_8004D828(Player* player) {
|
||||
func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 3.0f);
|
||||
}
|
||||
|
||||
if (player->wings.rightState == 2) {
|
||||
if (player->wings.rightState == WINGSTATE_INTACT) {
|
||||
func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z);
|
||||
player->wings.rightState = 1;
|
||||
player->wings.rightState = WINGSTATE_BROKEN;
|
||||
func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f);
|
||||
}
|
||||
if (player->wings.leftState == 2) {
|
||||
if (player->wings.leftState == WINGSTATE_INTACT) {
|
||||
func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z);
|
||||
player->wings.leftState = 1;
|
||||
player->wings.leftState = WINGSTATE_BROKEN;
|
||||
func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f);
|
||||
}
|
||||
} else if (((player->timer_220 > 0) || (player->pos.y < player->unk_0A4) || (player->pos.y < D_ctx_80177CC0) ||
|
||||
} else if (((player->timer_220 > 0) || (player->pos.y < player->unk_0A4) || (player->pos.y < gWaterLevel) ||
|
||||
(player->timer_1FC == 0)) &&
|
||||
(player->timer_1F8 == 0)) {
|
||||
if (gCamCount != 4) {
|
||||
@@ -1883,7 +1883,7 @@ void func_demo_8004DEF8(Player* player) {
|
||||
player->camRoll += 10.0f;
|
||||
}
|
||||
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) {
|
||||
if ((gGroundSurface == SURFACE_WATER) && (player->pos.y <= player->unk_0A4)) {
|
||||
func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->unk_138, 3.0f, 20.0f, 0);
|
||||
func_effect_8007ADF4(player->pos.x, gGroundHeight, player->unk_138, 0.1f, 2.0f);
|
||||
}
|
||||
|
||||
+18
-18
@@ -430,10 +430,10 @@ 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) && ((D_ctx_80177D40[0] % 2) != 0)) {
|
||||
if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x22);
|
||||
func_display_8005314C();
|
||||
if (D_ctx_80177D40[0] > 1000) {
|
||||
if (gRightWingFlashTimer[0] > 1000) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||
@@ -445,10 +445,10 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
|
||||
if (wings->rightState != 2) {
|
||||
*gfxPtr = NULL;
|
||||
}
|
||||
if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) {
|
||||
if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x22);
|
||||
func_display_8005314C();
|
||||
if (D_ctx_80177D40[0] > 1000) {
|
||||
if (gRightWingFlashTimer[0] > 1000) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||
@@ -462,10 +462,10 @@ 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) && ((D_ctx_80177D58[0] % 2) != 0)) {
|
||||
if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x22);
|
||||
func_display_8005314C();
|
||||
if (D_ctx_80177D58[0] > 1000) {
|
||||
if (gLeftWingFlashTimer[0] > 1000) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||
@@ -477,10 +477,10 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
|
||||
if (wings->leftState != 2) {
|
||||
*gfxPtr = NULL;
|
||||
}
|
||||
if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) {
|
||||
if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x22);
|
||||
func_display_8005314C();
|
||||
if (D_ctx_80177D58[0] > 1000) {
|
||||
if (gLeftWingFlashTimer[0] > 1000) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||
@@ -714,7 +714,7 @@ void func_display_80054300(Player* player) {
|
||||
if (player->unk_068 > 30.0f) {
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
}
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (player->unk_068 < 10.0f)) {
|
||||
if ((gGroundSurface == SURFACE_WATER) && (player->unk_068 < 10.0f)) {
|
||||
player->shadowing = 90;
|
||||
} else {
|
||||
player->shadowing = 180;
|
||||
@@ -1565,8 +1565,8 @@ void Play_Draw(void) {
|
||||
gPlayerCamAt.y += player->pos.y;
|
||||
gPlayerCamAt.z += player->unk_138 + player->unk_144;
|
||||
|
||||
if (player->cockpitView && (player->unk_110 > 5.0f)) {
|
||||
gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f;
|
||||
if (player->cockpitView && (player->boostSpeed > 5.0f)) {
|
||||
gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->boostSpeed * 0.2f;
|
||||
}
|
||||
} else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
func_display_800578C4(player);
|
||||
@@ -1608,7 +1608,7 @@ void Play_Draw(void) {
|
||||
Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8);
|
||||
D_ctx_80177CC8 = 0.0f;
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
} else if (gGroundType != GROUNDTYPE_WATER) {
|
||||
} else if (gGroundSurface != SURFACE_WATER) {
|
||||
D_bg_8015F964 = false;
|
||||
Background_DrawGround();
|
||||
}
|
||||
@@ -1623,7 +1623,7 @@ void Play_Draw(void) {
|
||||
func_display_800564C0(opponent, 0);
|
||||
func_display_80057814(opponent);
|
||||
}
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR,
|
||||
gAmbientG, gAmbientB);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
@@ -1642,7 +1642,7 @@ void Play_Draw(void) {
|
||||
TexturedLine_Draw();
|
||||
gReflectY = 1;
|
||||
PlayerShot_Draw();
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
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);
|
||||
gReflectY = -1;
|
||||
@@ -1650,7 +1650,7 @@ void Play_Draw(void) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
gReflectY = -1;
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
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);
|
||||
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
|
||||
@@ -1664,7 +1664,7 @@ void Play_Draw(void) {
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
Effect_Draw(0);
|
||||
}
|
||||
if ((gGroundType == GROUNDTYPE_WATER) || (gAqDrawMode != 0)) {
|
||||
if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) {
|
||||
D_bg_8015F964 = true;
|
||||
Effect_Draw(1);
|
||||
Background_DrawGround();
|
||||
@@ -1716,8 +1716,8 @@ void Play_Draw(void) {
|
||||
Background_DrawLensFlare();
|
||||
if ((gCamCount != 1) &&
|
||||
((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) {
|
||||
func_hud_8008FA84();
|
||||
func_hud_8008CA44();
|
||||
HUD_Draw();
|
||||
HUD_DrawEdgeArrows();
|
||||
}
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
func_display_80051B30();
|
||||
|
||||
@@ -683,7 +683,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
case OBJ_BOSS_295:
|
||||
case OBJ_BOSS_296:
|
||||
COS_DEG(gBosses[index].obj.rot.z);
|
||||
if (gGroundType == GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface == SURFACE_WATER) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150);
|
||||
@@ -1336,7 +1336,7 @@ void Object_DrawShadow(s32 index, Object* obj) {
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
break;
|
||||
}
|
||||
if ((D_ctx_801784AC != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) ||
|
||||
if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) ||
|
||||
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
@@ -1724,7 +1724,7 @@ void Effect_DrawAll(s32 arg0) {
|
||||
void Object_Draw(s32 arg0) {
|
||||
gReflectY = 1;
|
||||
Object_DrawAll(1);
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
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,
|
||||
gAmbientG, gAmbientB);
|
||||
@@ -1741,7 +1741,7 @@ void Effect_Draw(u8 arg0) {
|
||||
if (arg0 == 0) {
|
||||
gReflectY = 1;
|
||||
Effect_DrawAll(1);
|
||||
} else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
} else if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
gReflectY = -1;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||
|
||||
@@ -2189,7 +2189,7 @@ void func_effect_8007DB70(Effect* effect) {
|
||||
func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f);
|
||||
func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f,
|
||||
4.0f, 5);
|
||||
if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) {
|
||||
if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) {
|
||||
func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z,
|
||||
0.0f, 0.0f, 90.0f, 5.0f, 0, 0);
|
||||
break;
|
||||
@@ -2245,7 +2245,7 @@ void func_effect_8007E014(Effect* effect) {
|
||||
f32 z;
|
||||
f32 y;
|
||||
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
Ground_801B6E20(effect->obj.pos.x, effect->obj.pos.z + D_ctx_80177D20, &x, &y, &z);
|
||||
effect->obj.pos.y = y + 3.0f;
|
||||
effect->obj.rot.x = RAD_TO_DEG(x);
|
||||
@@ -2622,7 +2622,7 @@ void func_effect_8007F2FC(Effect* effect) {
|
||||
effect->vel.y -= 0.3f;
|
||||
}
|
||||
|
||||
if (effect->obj.pos.y < D_ctx_80177CC0) {
|
||||
if (effect->obj.pos.y < gWaterLevel) {
|
||||
effect->vel.y += 0.2f;
|
||||
effect->obj.pos.y -= effect->vel.y * 0.5f;
|
||||
effect->obj.pos.x -= effect->vel.x * 0.5f;
|
||||
@@ -2722,7 +2722,7 @@ void func_effect_8007F6B0(Effect* effect) {
|
||||
cos = __cosf(temp) * effect->scale2 * 8.0f;
|
||||
yPos = gGroundHeight + 40.0f;
|
||||
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z);
|
||||
yPos = y + 30.0f;
|
||||
}
|
||||
@@ -2769,7 +2769,7 @@ void func_effect_8007F958(Effect* effect) {
|
||||
cos = __cosf(temp) * effect->scale2 * 16.0f;
|
||||
yPos = gGroundHeight + 10.0f;
|
||||
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z);
|
||||
yPos = y + 10.0f;
|
||||
}
|
||||
@@ -2895,13 +2895,13 @@ void func_effect_8007FE88(Effect* effect) {
|
||||
}
|
||||
}
|
||||
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != 0) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
} else if (effect->obj.pos.y < gGroundHeight) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
if (gGroundType != GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface != SURFACE_WATER) {
|
||||
effect->obj.pos.y = gGroundHeight;
|
||||
func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f);
|
||||
}
|
||||
@@ -3025,14 +3025,14 @@ void func_effect_8008040C(Effect* effect) {
|
||||
}
|
||||
}
|
||||
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) !=
|
||||
0) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
} else if (effect->obj.pos.y < gGroundHeight) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
if (gGroundType != GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface != SURFACE_WATER) {
|
||||
effect->obj.pos.y = gGroundHeight;
|
||||
func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f);
|
||||
}
|
||||
|
||||
+19
-20
@@ -68,7 +68,7 @@ static Vec3f D_enmy_800CFF0C[] = {
|
||||
{ 0.0f, 0.0f, 0.0f }, { 0.0f, -90.0f, 0.0f }, { 0.0f, 90.0f, 0.0f },
|
||||
{ -90.0f, 0.0f, 0.0f }, { 0.0f, 180.0f, 0.0f }, { 90.0f, 0.0f, 0.0f },
|
||||
};
|
||||
u32 D_enmy_800CFF54[] = {
|
||||
u32 gWarpRingSfx[] = {
|
||||
0x19404038, 0x19404139, 0x1940423A, 0x1940433B, 0x1940443C, 0x1940453D, 0x1940463E, 0x1940463E, 0x1940463E,
|
||||
};
|
||||
|
||||
@@ -392,7 +392,7 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) {
|
||||
actor->fwork[25] = 20000.0f;
|
||||
actor->iwork[1] = gPrevEventActorIndex;
|
||||
actor->iwork[10] = gActors[gPrevEventActorIndex].aiType;
|
||||
actor->fwork[22] = D_play_80161A54;
|
||||
actor->fwork[22] = gArwingSpeed;
|
||||
Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, MTXF_APPLY);
|
||||
@@ -509,15 +509,15 @@ void func_enmy_80062568(void) {
|
||||
s32 temp = gCurrentLevel; // seems fake
|
||||
if (1) {}
|
||||
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[temp]);
|
||||
var_s0 = D_ctx_80177CA0 - 40;
|
||||
var_s0 = gSavedObjectLoadIndex - 40;
|
||||
objInit = &gLevelObjects[var_s0];
|
||||
|
||||
for (; var_s0 < D_ctx_80177CA0; var_s0++, objInit++) {
|
||||
for (; var_s0 < gSavedObjectLoadIndex; var_s0++, objInit++) {
|
||||
Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void Object_LoadFromInit(void) {
|
||||
void Object_LoadLevelObjects(void) {
|
||||
ObjectInit* objInit;
|
||||
f32 xMax;
|
||||
f32 xMin;
|
||||
@@ -568,7 +568,7 @@ void Object_LoadFromInit(void) {
|
||||
}
|
||||
gLastPathChange = 0;
|
||||
|
||||
for (i = 0, objInit = &gLevelObjects[D_ctx_80177DC8]; i < 10000; i++, D_ctx_80177DC8++, objInit++) {
|
||||
for (i = 0, objInit = &gLevelObjects[gObjectLoadIndex]; i < 10000; i++, gObjectLoadIndex++, objInit++) {
|
||||
if ((objInit->id > OBJ_INVALID) && D_ctx_80177D20 <= objInit->zPos1 &&
|
||||
objInit->zPos1 <= D_ctx_80177D20 + 200.0f) {
|
||||
if ((gCurrentLevel == LEVEL_VENOM_1) && (objInit->id >= ACTOR_EVENT_ID)) {
|
||||
@@ -1077,7 +1077,7 @@ void Object_Init(s32 index, ObjectId objId) {
|
||||
func_enmy_80063CAC(&gScenery[index]);
|
||||
break;
|
||||
case OBJ_ITEM_CHECKPOINT:
|
||||
if (D_ctx_80177CA0 != 0) {
|
||||
if (gSavedObjectLoadIndex != 0) {
|
||||
gItems[index].obj.status = OBJ_FREE;
|
||||
}
|
||||
break;
|
||||
@@ -1347,7 +1347,7 @@ void func_enmy_800652CC(Scenery* scenery) {
|
||||
f32 sp28;
|
||||
f32 sp24;
|
||||
|
||||
if ((D_ctx_801784AC == 4) && (scenery->state == 0)) {
|
||||
if ((gGroundType == 4) && (scenery->state == 0)) {
|
||||
Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28);
|
||||
scenery->obj.pos.y = sp24 + 3.0f;
|
||||
scenery->obj.rot.x = RAD_TO_DEG(sp2C);
|
||||
@@ -1576,8 +1576,7 @@ void func_enmy_800656D4(Actor* actor) {
|
||||
}
|
||||
Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f);
|
||||
}
|
||||
if ((D_ctx_801784AC == 4) &&
|
||||
Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20)) {
|
||||
if ((gGroundType == 4) && Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20)) {
|
||||
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f);
|
||||
Object_Kill(&actor->obj, actor->sfxSource);
|
||||
}
|
||||
@@ -1904,7 +1903,7 @@ void func_enmy_80066EF0(Item* item) {
|
||||
if (gPlayer[0].form != FORM_ARWING) {
|
||||
var_fa1 = 600.0f;
|
||||
}
|
||||
if (gPlayer[0].unk_0AC + var_fa1 < item->obj.pos.x) {
|
||||
if (item->obj.pos.x > gPlayer[0].unk_0AC + var_fa1) {
|
||||
Math_SmoothStepToF(&item->obj.pos.x, gPlayer[0].unk_0AC + var_fa1, 0.1f, 10.0f, 0.01f);
|
||||
}
|
||||
if (item->obj.pos.x < gPlayer[0].unk_0AC - var_fa1) {
|
||||
@@ -2059,11 +2058,11 @@ void ActorSupplies_Draw(Actor* actor) {
|
||||
void func_enmy_80067A40(void) {
|
||||
AUDIO_PLAY_SFX(0x09008023, gPlayer[0].sfxSource, 0);
|
||||
if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) {
|
||||
D_ctx_80177D40[0] = 1050;
|
||||
gRightWingFlashTimer[0] = 1050;
|
||||
gPlayer[0].wings.rightState = WINGSTATE_INTACT;
|
||||
}
|
||||
if (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) {
|
||||
D_ctx_80177D58[0] = 1050;
|
||||
gLeftWingFlashTimer[0] = 1050;
|
||||
gPlayer[0].wings.leftState = WINGSTATE_INTACT;
|
||||
}
|
||||
if (gExpertMode) {
|
||||
@@ -2122,8 +2121,8 @@ void ItemPickup_Update(Item* this) {
|
||||
} else {
|
||||
gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60;
|
||||
}
|
||||
D_ctx_80177D40[this->playerNum] = 1030;
|
||||
D_ctx_80177D58[this->playerNum] = 1030;
|
||||
gRightWingFlashTimer[this->playerNum] = 1030;
|
||||
gLeftWingFlashTimer[this->playerNum] = 1030;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2277,9 +2276,9 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
|
||||
this->state = 1;
|
||||
this->unk_44 = 255;
|
||||
gPlayer[this->playerNum].timer_27C = 100;
|
||||
AUDIO_PLAY_SFX(D_enmy_800CFF54[gRingPassCount], gPlayer[0].sfxSource, 0);
|
||||
AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0);
|
||||
if (gRingPassCount == 0) {
|
||||
gPlayer[0].unk_110 = 0.0f;
|
||||
gPlayer[0].boostSpeed = 0.0f;
|
||||
}
|
||||
gRingPassCount++;
|
||||
if (gRingPassCount >= 7) {
|
||||
@@ -2328,10 +2327,10 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) {
|
||||
gPlayer[this->playerNum].heal = 128;
|
||||
this->state++;
|
||||
this->timer_48 = 15;
|
||||
gSavedGroundType = gGroundType;
|
||||
gSavedGroundSurface = gGroundSurface;
|
||||
D_ctx_80177CB0 = -this->obj.pos.z;
|
||||
D_ctx_80177CB0 -= 250.0f;
|
||||
D_ctx_80177CA0 = D_ctx_80177DC8;
|
||||
gSavedObjectLoadIndex = gObjectLoadIndex;
|
||||
gSavedZoSearchlightStatus = gMissedZoSearchlight;
|
||||
gSavedHitCount = gHitCount;
|
||||
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
|
||||
@@ -2879,7 +2878,7 @@ void Object_Update(void) {
|
||||
}
|
||||
if (gLevelMode != LEVELMODE_ALL_RANGE) {
|
||||
if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
Object_LoadFromInit();
|
||||
Object_LoadLevelObjects();
|
||||
}
|
||||
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
|
||||
if (scenery->obj.status != OBJ_FREE) {
|
||||
|
||||
+610
-610
File diff suppressed because it is too large
Load Diff
@@ -28,17 +28,17 @@ void func_fade_80084488(s32 arg0) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
|
||||
void func_fade_80084688(s32 arg0, s32 arg1) {
|
||||
if (arg1 != 0) {
|
||||
switch (arg0) {
|
||||
void func_fade_80084688(s32 fade, s32 progress) {
|
||||
if (progress != 0) {
|
||||
switch (fade) {
|
||||
case 0:
|
||||
func_fade_80084488(arg1);
|
||||
func_fade_80084488(progress);
|
||||
break;
|
||||
case 1:
|
||||
func_fade_80084370(arg1);
|
||||
func_fade_80084370(progress);
|
||||
break;
|
||||
case 2:
|
||||
func_fade_800843FC(arg1);
|
||||
func_fade_800843FC(progress);
|
||||
break;
|
||||
default:
|
||||
(void) "そのような フェード は ない (%d)\n"; // There is no such fade
|
||||
|
||||
+15
-15
@@ -86,7 +86,7 @@ void Game_SetGameState(void) {
|
||||
}
|
||||
break;
|
||||
case GSTATE_MAP:
|
||||
D_ctx_80177B40 = 0;
|
||||
gMapState = 0;
|
||||
break;
|
||||
case GSTATE_GAME_OVER:
|
||||
D_ctx_80177868 = 0;
|
||||
@@ -383,7 +383,7 @@ void Game_Update(void) {
|
||||
break;
|
||||
case GSTATE_INIT:
|
||||
gGameState = GSTATE_TITLE;
|
||||
D_ctx_80177AE0 = 1;
|
||||
gTitleState = 1;
|
||||
D_ctx_80177824 = 1;
|
||||
Memory_FreeAll();
|
||||
Play_ClearObjectData();
|
||||
@@ -391,9 +391,9 @@ void Game_Update(void) {
|
||||
gLifeCount[0] = 2;
|
||||
D_ctx_80177D20 = 0.0f;
|
||||
D_hud_8016170C = gCsFrameCount = gShowLevelClearStatusScreen = gLevelStartStatusScreenTimer =
|
||||
gLevelClearScreenTimer = D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = gStarCount =
|
||||
D_ctx_80177B40 = gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud =
|
||||
gBgColor = gFillScreenAlpha = 0;
|
||||
gLevelClearScreenTimer = gVsMatchState = gVersusMode = gTitleState = gStarCount = gMapState =
|
||||
gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor =
|
||||
gFillScreenAlpha = 0;
|
||||
gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 =
|
||||
D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -410,7 +410,7 @@ void Game_Update(void) {
|
||||
gPlayerGlareAlphas[i] = 0;
|
||||
}
|
||||
gVersusStage = 0;
|
||||
D_ctx_801778A4 = 3;
|
||||
gVsPointsToWin = 3;
|
||||
gBlurAlpha = 255;
|
||||
for (i = 0; i < 30; i++) {
|
||||
gLeveLClearStatus[i] = 0;
|
||||
@@ -512,19 +512,19 @@ void Game_Update(void) {
|
||||
gDPFillRectangle(gMasterDisp++, SCREEN_MARGIN, SCREEN_HEIGHT / 2 - 1 - 1, SCREEN_WIDTH - SCREEN_MARGIN,
|
||||
SCREEN_HEIGHT / 2 + 1);
|
||||
|
||||
func_hud_8008CB8C();
|
||||
HUD_dummy_8008CB8C();
|
||||
}
|
||||
partialFill = false;
|
||||
if (gCamCount == 1) {
|
||||
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerGlareReds[0],
|
||||
gPlayerGlareGreens[0], gPlayerGlareBlues[0], gPlayerGlareAlphas[0]);
|
||||
if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) {
|
||||
func_radio_800BB5D0();
|
||||
Radio_Draw();
|
||||
if (gShowHud) {
|
||||
func_hud_8008FA84();
|
||||
func_hud_8008CA44();
|
||||
HUD_Draw();
|
||||
HUD_DrawEdgeArrows();
|
||||
}
|
||||
func_hud_8008DE68();
|
||||
HUD_DrawBossHealth();
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < gCamCount; i++) {
|
||||
@@ -541,18 +541,18 @@ void Game_Update(void) {
|
||||
}
|
||||
}
|
||||
}
|
||||
func_bg_80040CDC();
|
||||
func_hud_8008865C();
|
||||
Background_dummy_80040CDC();
|
||||
HUD_DrawStatusScreens();
|
||||
AllRange_UpdateCountdown();
|
||||
if ((gGameState == GSTATE_PLAY) && gVersusMode) {
|
||||
func_versus_800C1ED4();
|
||||
Versus_Draw();
|
||||
}
|
||||
func_fade_80084688(0, D_ctx_80177C50);
|
||||
if (!partialFill) {
|
||||
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed,
|
||||
gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha);
|
||||
}
|
||||
func_80016A50();
|
||||
Audio_dummy_80016A50();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+36
-35
@@ -669,7 +669,7 @@ void func_hud_80086664(f32 x, f32 y) {
|
||||
y2 + i, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
if ((D_ctx_80177CA0 == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
|
||||
if ((gSavedObjectLoadIndex == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
|
||||
(gCurrentLevel != LEVEL_TRAINING)) {
|
||||
func_hud_80087788();
|
||||
func_hud_80084B94(0);
|
||||
@@ -718,7 +718,7 @@ void func_hud_80086C08(f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
|
||||
TextureRect_8bCI(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale);
|
||||
}
|
||||
|
||||
void func_hud_80086CC8(void) {
|
||||
void HUD_DrawLevelStartStatusScreen(void) {
|
||||
char pad;
|
||||
f32 sp18;
|
||||
f32 temp;
|
||||
@@ -748,7 +748,7 @@ void func_hud_80086CC8(void) {
|
||||
|
||||
f32 D_800D1CFC = 0.0f;
|
||||
|
||||
void func_hud_80086DCC(void) {
|
||||
void HUD_DrawLevelClearScreen(void) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 temp;
|
||||
@@ -1034,7 +1034,7 @@ void func_hud_80087788(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_hud_80087B5C(void) {
|
||||
void HUD_DrawLevelClearStatusScreen(void) {
|
||||
s32 i;
|
||||
s32 temp;
|
||||
f32 x0;
|
||||
@@ -1307,7 +1307,7 @@ void func_hud_80088564(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_hud_8008865C(void) {
|
||||
void HUD_DrawStatusScreens(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
@@ -1315,9 +1315,9 @@ void func_hud_8008865C(void) {
|
||||
D_801617E8[i]--;
|
||||
}
|
||||
}
|
||||
func_hud_80086CC8();
|
||||
func_hud_80086DCC();
|
||||
func_hud_80087B5C();
|
||||
HUD_DrawLevelStartStatusScreen();
|
||||
HUD_DrawLevelClearScreen();
|
||||
HUD_DrawLevelClearStatusScreen();
|
||||
}
|
||||
|
||||
s32 func_hud_800886B8(void) {
|
||||
@@ -1563,7 +1563,7 @@ void func_hud_80088970(void) {
|
||||
gAllRangeCheckpoint = 0;
|
||||
gSavedZoSearchlightStatus = false;
|
||||
|
||||
gSavedHitCount = D_ctx_80177CA0 = 0;
|
||||
gSavedHitCount = gSavedObjectLoadIndex = 0;
|
||||
|
||||
Audio_StopPlayerNoise(0);
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT;
|
||||
@@ -2195,7 +2195,7 @@ void func_hud_8008AD94(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x4C);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
|
||||
switch ((s32) D_ctx_80177D68) {
|
||||
switch ((s32) gRadioMsgRadioId) {
|
||||
case RCID_FOX:
|
||||
Graphics_DisplaySmallText(73, 173, 1.0f, 1.0f, "FOX");
|
||||
break;
|
||||
@@ -2398,7 +2398,7 @@ s32 func_hud_8008B774(void) {
|
||||
s32 ret = 0;
|
||||
s32 temp;
|
||||
|
||||
switch (D_ctx_801782A4) {
|
||||
switch (gCurrentRadioPortrait) {
|
||||
case 0:
|
||||
case 1:
|
||||
i = 0;
|
||||
@@ -2522,7 +2522,8 @@ void func_hud_8008B9E8(void) {
|
||||
}
|
||||
|
||||
if ((D_80161788 == 0) && (D_8016178C == 0)) {
|
||||
if ((gRadioState >= 4) && (D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) {
|
||||
if ((gRadioState >= 4) && (gCurrentRadioPortrait != RCID_STATIC) &&
|
||||
(gCurrentRadioPortrait != RCID_STATIC_FLIP)) {
|
||||
temp = func_hud_8008B774();
|
||||
if (temp == 1) {
|
||||
D_80161788 = 20;
|
||||
@@ -2535,7 +2536,7 @@ void func_hud_8008B9E8(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((D_ctx_801782A4 == RCID_STATIC) || (D_ctx_801782A4 == RCID_STATIC_FLIP)) {
|
||||
if ((gCurrentRadioPortrait == RCID_STATIC) || (gCurrentRadioPortrait == RCID_STATIC_FLIP)) {
|
||||
D_80161788 = 0;
|
||||
D_8016178C = 0;
|
||||
}
|
||||
@@ -2769,7 +2770,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
|
||||
void func_hud_8008CA44(void) {
|
||||
void HUD_DrawEdgeArrows(void) {
|
||||
s32 D_800D2048[] = {
|
||||
0x80, 0x40, 0x20, 0x10, 8 | 2, 8 | 1, 4 | 2, 4 | 1, 8, 4, 2, 1,
|
||||
};
|
||||
@@ -2797,7 +2798,7 @@ void func_hud_8008CA44(void) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_hud_8008CB8C(void) {
|
||||
s32 HUD_dummy_8008CB8C(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2814,7 +2815,7 @@ void func_hud_8008CBE4(void) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
if (D_ctx_801778AC != 0) {
|
||||
if (gVsMatchType != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2843,7 +2844,7 @@ void func_hud_8008CBE4(void) {
|
||||
|
||||
for (i = 0; i < D_ctx_80177DB8[gPlayerNum]; i++) {
|
||||
if (D_80161748[gPlayerNum] < (i + 1)) {
|
||||
if (((i + 1) != 1) && ((i + 1) == (D_ctx_801778A4 - 1))) {
|
||||
if (((i + 1) != 1) && ((i + 1) == (gVsPointsToWin - 1))) {
|
||||
D_80161760[gPlayerNum] = 50;
|
||||
D_80161738[gPlayerNum] = 0;
|
||||
} else {
|
||||
@@ -3060,7 +3061,7 @@ void func_hud_8008DD78(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg
|
||||
}
|
||||
}
|
||||
|
||||
void func_hud_8008DE68(void) {
|
||||
void HUD_DrawBossHealth(void) {
|
||||
f32 sp3C;
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
@@ -3534,7 +3535,7 @@ void func_hud_8008F96C(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_hud_8008FA84(void) {
|
||||
void HUD_Draw(void) {
|
||||
s32 i;
|
||||
s32 goldRings;
|
||||
bool medalStatus;
|
||||
@@ -4063,14 +4064,14 @@ void func_hud_80091254(Actor* actor) {
|
||||
}
|
||||
|
||||
bool func_hud_80091298(Actor* actor) {
|
||||
actor->fwork[1] = gPlayer[0].unk_0D0 + 10.0f;
|
||||
actor->fwork[1] = gPlayer[0].baseSpeed + 10.0f;
|
||||
actor->fwork[3] = 3.6f;
|
||||
actor->fwork[4] = gPlayer[0].pos.x + ((f32) (actor->aiType - 2) * 700.0f);
|
||||
actor->fwork[5] = gPlayer[0].pos.y;
|
||||
actor->fwork[6] = gPlayer[0].unk_138;
|
||||
|
||||
if ((fabsf(actor->obj.pos.x - actor->fwork[4]) < 700.0f) || (fabsf(actor->obj.pos.z - actor->fwork[6]) < 700.0f)) {
|
||||
actor->fwork[1] = gPlayer[0].unk_0D0 - 10.0f;
|
||||
actor->fwork[1] = gPlayer[0].baseSpeed - 10.0f;
|
||||
actor->fwork[3] = 1.2f;
|
||||
}
|
||||
return false;
|
||||
@@ -4929,7 +4930,7 @@ void HUD_AquasStart(Player* player) {
|
||||
player->unk_234 = 0;
|
||||
player->unk_1D0 = 1;
|
||||
player->unk_208 = 0;
|
||||
player->unk_0D0 = 0.0f;
|
||||
player->baseSpeed = 0.0f;
|
||||
|
||||
gFillScreenAlpha = 255;
|
||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
|
||||
@@ -5222,7 +5223,7 @@ void HUD_AquasStart(Player* player) {
|
||||
D_ctx_80177A48[0] = 0.1f;
|
||||
|
||||
player->unk_0E8 = 0.0f;
|
||||
player->unk_0D0 = 20.0f;
|
||||
player->baseSpeed = 20.0f;
|
||||
player->unk_234 = 1;
|
||||
player->unk_1D0 = 6;
|
||||
|
||||
@@ -5287,7 +5288,7 @@ void HUD_AquasStart(Player* player) {
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
src.z = player->unk_0D0;
|
||||
src.z = player->baseSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
|
||||
@@ -5692,9 +5693,9 @@ void HUD_AquasComplete(Player* player) {
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->unk_0D0, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->unk_0D0, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->unk_0D0, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->baseSpeed, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->baseSpeed, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->baseSpeed, 0.001f);
|
||||
|
||||
player->cam.eye.x = gCsCamEyeX;
|
||||
player->cam.eye.y = gCsCamEyeY;
|
||||
@@ -5730,8 +5731,8 @@ void HUD_AquasComplete(Player* player) {
|
||||
player->unk_0F8 = player->unk_0EC = player->unk_12C = player->unk_130 = 0.0f;
|
||||
player->vel.x = player->vel.y = player->vel.z = 0.0f;
|
||||
player->unk_0E4 = player->unk_0E8 = player->unk_0EC = 0.0f;
|
||||
player->unk_110 = player->unk_114 = 0.0f;
|
||||
player->unk_0D0 = 3.6f;
|
||||
player->boostSpeed = player->unk_114 = 0.0f;
|
||||
player->baseSpeed = 3.6f;
|
||||
player->unk_138 = player->pos.z = 0.0f;
|
||||
player->pos.y = 100.0f;
|
||||
player->pos.x = -100.0f;
|
||||
@@ -5819,7 +5820,7 @@ void HUD_AquasComplete(Player* player) {
|
||||
}
|
||||
if (gCsFrameCount >= 1200) {
|
||||
Math_SmoothStepToF(&actor->fwork[3], 800.0f, 0.02f, 1000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_0D0, 5.0f, 0.1f, 1000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 5.0f, 0.1f, 1000.0f, 0.001f);
|
||||
} else {
|
||||
actor->fwork[4] = player->pos.x;
|
||||
actor->fwork[5] = player->pos.y;
|
||||
@@ -5940,7 +5941,7 @@ void HUD_AquasComplete(Player* player) {
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
src.z = player->unk_0D0;
|
||||
src.z = player->baseSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
|
||||
@@ -5990,7 +5991,7 @@ void func_hud_80096A74(Player* player) {
|
||||
case 0:
|
||||
player->pos.y += 3400.0f;
|
||||
player->unk_0E4 = 270.0f;
|
||||
gPlayer[0].unk_0D0 = 0.0f;
|
||||
gPlayer[0].baseSpeed = 0.0f;
|
||||
|
||||
D_ctx_80177A48[1] = 100.0f;
|
||||
D_ctx_80177A48[2] = 0.0f;
|
||||
@@ -6088,7 +6089,7 @@ void func_hud_80096A74(Player* player) {
|
||||
D_ctx_80177CE8 = 0;
|
||||
gLevelStartStatusScreenTimer = 50;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
|
||||
player->unk_0D0 = D_play_80161A54;
|
||||
player->baseSpeed = gArwingSpeed;
|
||||
player->unk_1D0 = 0;
|
||||
player->timer_1F8 = 0;
|
||||
player->unk_014 = 0.0f;
|
||||
@@ -6100,7 +6101,7 @@ void func_hud_80096A74(Player* player) {
|
||||
}
|
||||
|
||||
if (gCsFrameCount >= 30) {
|
||||
Math_SmoothStepToF(&player->unk_0D0, 30.0f, 0.05f, 1000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 30.0f, 0.05f, 1000.0f, 0.001f);
|
||||
|
||||
if (gCsFrameCount < 110) {
|
||||
player->unk_0EC += (D_ctx_80177A48[4] * 2.0f);
|
||||
@@ -6129,7 +6130,7 @@ void func_hud_80096A74(Player* player) {
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
src.z = player->unk_0D0;
|
||||
src.z = player->baseSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
|
||||
|
||||
+190
-189
@@ -37,13 +37,13 @@ u8 D_800D2F6C[20] = {
|
||||
};
|
||||
|
||||
u8 gSavedZoSearchlightStatus;
|
||||
f32 D_play_80161A54;
|
||||
f32 gArwingSpeed;
|
||||
s32 D_play_80161A58;
|
||||
s32 D_play_80161A5C;
|
||||
u16 gScreenFlashTimer;
|
||||
u16 gDropHitCountItem;
|
||||
s32 D_play_80161A64;
|
||||
EnvSettings* sEnvSettings;
|
||||
Environment* sEnvironment;
|
||||
|
||||
#define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr))))
|
||||
|
||||
@@ -170,7 +170,7 @@ void func_play_800A46A0(Player* player) {
|
||||
|
||||
if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
|
||||
if (player->wings.rightState <= WINGSTATE_BROKEN) {
|
||||
if (((gGameFrameCount % 2U) == 0) && (D_ctx_80177D70[player->num] != 0)) {
|
||||
if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) {
|
||||
func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y,
|
||||
player->hit1.z, 1.0f);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void func_play_800A46A0(Player* player) {
|
||||
}
|
||||
}
|
||||
if (player->wings.leftState <= WINGSTATE_BROKEN) {
|
||||
if (((gGameFrameCount % 2U) == 0) && (D_ctx_80177D88[player->num] != 0)) {
|
||||
if (((gGameFrameCount % 2U) == 0) && (gLeftWingDebrisTimer[player->num] != 0)) {
|
||||
func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y,
|
||||
player->hit2.z, 1.0f);
|
||||
}
|
||||
@@ -234,7 +234,7 @@ void func_play_800A4C40(Player* player) {
|
||||
Vec3f sp3C;
|
||||
Vec3f sp30;
|
||||
|
||||
if (gGroundType == GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface == SURFACE_WATER) {
|
||||
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY);
|
||||
@@ -290,7 +290,7 @@ void func_play_800A4F7C(void) {
|
||||
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4);
|
||||
break;
|
||||
case VS_STAGE_SECTOR_Z:
|
||||
if (D_ctx_801778AC == 2) {
|
||||
if (gVsMatchType == 2) {
|
||||
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E378);
|
||||
} else {
|
||||
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E170);
|
||||
@@ -455,7 +455,7 @@ void Play_Setup(void) {
|
||||
gMissedZoSearchlight = false;
|
||||
gSavedZoSearchlightStatus = false;
|
||||
gSceneSetup = 0;
|
||||
gAllRangeCheckpoint = D_ctx_80177CA0 = 0;
|
||||
gAllRangeCheckpoint = gSavedObjectLoadIndex = 0;
|
||||
D_ctx_80177CB0 = 0.0f;
|
||||
gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0;
|
||||
D_ctx_8017782C = 1;
|
||||
@@ -473,7 +473,7 @@ void Play_Setup(void) {
|
||||
}
|
||||
}
|
||||
|
||||
EnvSettings* D_800D2F98[21] = {
|
||||
Environment* D_800D2F98[21] = {
|
||||
&D_CO_6037160, &D_ME_6026C80, &D_SX_602A120, &D_A6_6023F20, &D_A6_6028760, &D_SY_602E4B0, &D_VE1_6007E30,
|
||||
&D_SO_601F1F0, &D_ZO_60266D0, &D_ANDROSS_C035110, &D_TR_6006A60, &D_MA_6030E30, &D_TI_6005000, &D_AQ_602E540,
|
||||
&D_FO_600EA90, NULL, &D_KA_6011000, &D_BO_600FF30, &D_SZ_6006E70, &D_VE2_6014D50, &D_versus_302DD70,
|
||||
@@ -483,17 +483,17 @@ void func_play_800A594C(void) {
|
||||
if (gVersusMode) {
|
||||
switch (gVersusStage) {
|
||||
case 0:
|
||||
sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_versus_302DD70);
|
||||
sEnvironment = SEGMENTED_TO_VIRTUAL(&D_versus_302DD70);
|
||||
break;
|
||||
case 1:
|
||||
sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_versus_302DDB4);
|
||||
sEnvironment = SEGMENTED_TO_VIRTUAL(&D_versus_302DDB4);
|
||||
break;
|
||||
case 2:
|
||||
sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_versus_302DDF8);
|
||||
sEnvironment = SEGMENTED_TO_VIRTUAL(&D_versus_302DDF8);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
sEnvSettings = SEGMENTED_TO_VIRTUAL(D_800D2F98[gCurrentLevel]);
|
||||
sEnvironment = SEGMENTED_TO_VIRTUAL(D_800D2F98[gCurrentLevel]);
|
||||
}
|
||||
if (D_ctx_8017782C == 0) {
|
||||
if (gCurrentLevel == LEVEL_SOLAR) {
|
||||
@@ -502,28 +502,28 @@ void func_play_800A594C(void) {
|
||||
Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x3140807E);
|
||||
}
|
||||
} else if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_AQ_602E584);
|
||||
sEnvironment = SEGMENTED_TO_VIRTUAL(&D_AQ_602E584);
|
||||
}
|
||||
gBgmSeqId = sEnvSettings->seqId;
|
||||
gLevelType = sEnvSettings->type;
|
||||
D_ctx_801784AC = sEnvSettings->unk_04;
|
||||
gBgColor = sEnvSettings->bgColor;
|
||||
gFogRed = sEnvSettings->fogR;
|
||||
gFogGreen = sEnvSettings->fogG;
|
||||
gFogBlue = sEnvSettings->fogB;
|
||||
gFogNear = sEnvSettings->fogN;
|
||||
gFogFar = sEnvSettings->fogF;
|
||||
gLight1R = gLight2R = D_ctx_80161A70 = sEnvSettings->lightR;
|
||||
gLight1G = gLight2G = D_ctx_80161A74 = sEnvSettings->lightG;
|
||||
gLight1B = gLight2B = D_ctx_80161A78 = sEnvSettings->lightB;
|
||||
gAmbientR = sEnvSettings->ambR;
|
||||
gAmbientG = sEnvSettings->ambG;
|
||||
gAmbientB = sEnvSettings->ambB;
|
||||
D_ctx_801784D0 = D_ctx_801784F8 = D_ctx_80178520 = D_ctx_801784B8 = D_ctx_801784C4 = sEnvSettings->unk_20.x;
|
||||
D_ctx_801784D4 = D_ctx_801784FC = D_ctx_80178524 = D_ctx_801784BC = D_ctx_801784C8 = sEnvSettings->unk_20.y;
|
||||
D_ctx_801784D8 = D_ctx_80178500 = D_ctx_80178528 = D_ctx_801784C0 = D_ctx_801784CC = sEnvSettings->unk_20.z;
|
||||
gBgmSeqId = sEnvironment->seqId;
|
||||
gLevelType = sEnvironment->type;
|
||||
gGroundType = sEnvironment->unk04;
|
||||
gBgColor = sEnvironment->bgColor;
|
||||
gFogRed = sEnvironment->fogR;
|
||||
gFogGreen = sEnvironment->fogG;
|
||||
gFogBlue = sEnvironment->fogB;
|
||||
gFogNear = sEnvironment->fogN;
|
||||
gFogFar = sEnvironment->fogF;
|
||||
gLight1R = gLight2R = D_ctx_80161A70 = sEnvironment->lightR;
|
||||
gLight1G = gLight2G = D_ctx_80161A74 = sEnvironment->lightG;
|
||||
gLight1B = gLight2B = D_ctx_80161A78 = sEnvironment->lightB;
|
||||
gAmbientR = sEnvironment->ambR;
|
||||
gAmbientG = sEnvironment->ambG;
|
||||
gAmbientB = sEnvironment->ambB;
|
||||
gEnvLightxRot = gLight2xRotTarget = D_ctx_80178520 = gLight1xRot = gLight1xRotTarget = sEnvironment->lightDir.x;
|
||||
gEnvLightyRot = gLight2yRotTarget = D_ctx_80178524 = gLight1yRot = gLight1yRotTarget = sEnvironment->lightDir.y;
|
||||
gEnvLightzRot = gLight2zRotTarget = D_ctx_80178528 = gLight1zRot = gLight1zRotTarget = sEnvironment->lightDir.z;
|
||||
gProjectFar = 12800.0f;
|
||||
D_ctx_80178540 = 40;
|
||||
gLight2colorStep = 40;
|
||||
D_ctx_80178544 = 40;
|
||||
gFovY = 45.0f;
|
||||
}
|
||||
@@ -779,14 +779,14 @@ bool func_play_800A6A74(void) {
|
||||
void Player_DamageWings(Player* player, s32 side, s32 damage) {
|
||||
if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) {
|
||||
if (side == 1) {
|
||||
D_ctx_80177D40[player->num] = 30;
|
||||
gRightWingFlashTimer[player->num] = 30;
|
||||
if (player->wings.rightState == WINGSTATE_INTACT) {
|
||||
gRightWingHealth[player->num] -= damage;
|
||||
if (gRightWingHealth[player->num] <= 0) {
|
||||
func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z);
|
||||
player->wings.rightState = WINGSTATE_BROKEN;
|
||||
func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f);
|
||||
D_ctx_80177D70[player->num] = 50;
|
||||
gRightWingDebrisTimer[player->num] = 50;
|
||||
func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num);
|
||||
if (gAllRangeWingRepairTimer == 0) {
|
||||
gAllRangeWingRepairTimer = 1000;
|
||||
@@ -794,14 +794,14 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) {
|
||||
}
|
||||
}
|
||||
} else if (side == 2) {
|
||||
D_ctx_80177D58[player->num] = 30;
|
||||
gLeftWingFlashTimer[player->num] = 30;
|
||||
if (player->wings.leftState == WINGSTATE_INTACT) {
|
||||
gLeftWingHealth[player->num] -= damage;
|
||||
if (gLeftWingHealth[player->num] <= 0) {
|
||||
func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z);
|
||||
player->wings.leftState = WINGSTATE_BROKEN;
|
||||
func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f);
|
||||
D_ctx_80177D88[player->num] = 50;
|
||||
gLeftWingDebrisTimer[player->num] = 50;
|
||||
func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num);
|
||||
if (gAllRangeWingRepairTimer == 0) {
|
||||
gAllRangeWingRepairTimer = 1000;
|
||||
@@ -833,7 +833,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
|
||||
player->unk_284 = 0;
|
||||
player->unk_1F4 = 20;
|
||||
if (player->unk_1A4 > 40) {
|
||||
sp34 = (player->unk_110 * 0.3f) + 20.0f;
|
||||
sp34 = (player->boostSpeed * 0.3f) + 20.0f;
|
||||
player->timer_498 = 5;
|
||||
} else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBossActive == 0)) {
|
||||
player->timer_498 = 3;
|
||||
@@ -951,7 +951,7 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) {
|
||||
if (player->form == FORM_LANDMASTER) {
|
||||
player->pos.x -= D_800D2FEC[player->unk_21C];
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_0D0, 2.0f, 1.0f, 2.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
@@ -962,7 +962,7 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) {
|
||||
player->pos.z += D_800D2FEC[player->unk_21C];
|
||||
}
|
||||
player->unk_138 = player->pos.z;
|
||||
Math_SmoothStepToF(&player->unk_0D0, 2.0f, 1.0f, 2.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f);
|
||||
break;
|
||||
case 0:
|
||||
case 5:
|
||||
@@ -1582,12 +1582,12 @@ void func_play_800A8BA4(Player* player) {
|
||||
f32 sp8C;
|
||||
|
||||
func_play_800A887C(player);
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
switch (player->form) {
|
||||
case FORM_LANDMASTER:
|
||||
func_tank_800444BC(player);
|
||||
break;
|
||||
case FORM_BLUE_MARINE:
|
||||
case FORM_BLUE_MARINE: // This should probably be FORM_ON_FOOT
|
||||
if (Ground_801B6AEC(player->pos.x, player->pos.y - 12.0f, player->unk_138 + player->unk_144)) {
|
||||
Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &spE8, &spE0, &spE4);
|
||||
player->pos.y = spE0 + 10.0f;
|
||||
@@ -1596,9 +1596,9 @@ void func_play_800A8BA4(Player* player) {
|
||||
}
|
||||
} else if (player->form == FORM_ARWING) {
|
||||
if ((player->hit1.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) {
|
||||
if (gGroundType == GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface == SURFACE_WATER) {
|
||||
player->unk_1F4 = 7;
|
||||
player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f;
|
||||
player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.5f;
|
||||
} else {
|
||||
Player_ApplyDamage(player, 1, 21);
|
||||
}
|
||||
@@ -1609,9 +1609,9 @@ void func_play_800A8BA4(Player* player) {
|
||||
}
|
||||
}
|
||||
if ((player->hit2.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) {
|
||||
if (gGroundType == GROUNDTYPE_WATER) {
|
||||
if (gGroundSurface == SURFACE_WATER) {
|
||||
player->unk_1F4 = 7;
|
||||
player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f;
|
||||
player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.5f;
|
||||
} else {
|
||||
Player_ApplyDamage(player, 2, 21);
|
||||
}
|
||||
@@ -1769,10 +1769,10 @@ void func_play_800A8BA4(Player* player) {
|
||||
if (temp_v0 != 0) {
|
||||
if (temp_v0 < 0) {
|
||||
if (temp_v0 == -1) {
|
||||
D_ctx_80178540 = 40;
|
||||
D_ctx_80178570 = 20;
|
||||
D_ctx_80178574 = 20;
|
||||
D_ctx_80178578 = 20;
|
||||
gLight2colorStep = 40;
|
||||
gLight2RTarget = 20;
|
||||
gLight2GTarget = 20;
|
||||
gLight2BTarget = 20;
|
||||
player->shadowing = 80;
|
||||
}
|
||||
if (player->whooshTimer == 0) {
|
||||
@@ -1795,7 +1795,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
if ((scenery->obj.id == OBJ_SCENERY_48) || (scenery->obj.id == OBJ_SCENERY_55) ||
|
||||
(scenery->obj.id == OBJ_SCENERY_49)) {
|
||||
Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
spC8.x = -(player->unk_0D0 + player->unk_110) * 0.7f;
|
||||
spC8.x = -(player->baseSpeed + player->boostSpeed) * 0.7f;
|
||||
spC8.y = 0.0f;
|
||||
spC8.z = 0.0f;
|
||||
|
||||
@@ -1850,7 +1850,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
spfD4.z = fabsf(boss->obj.pos.z - player->unk_138) * 0.8333333f;
|
||||
if ((VEC3F_MAG(&spfD4)) < 1500.0f) {
|
||||
Player_ApplyDamage(player, 0, boss->info.damage);
|
||||
player->unk_110 = 0.0f;
|
||||
player->boostSpeed = 0.0f;
|
||||
player->timer_498 = 5;
|
||||
player->unk_0D8.y = 30.0f;
|
||||
boss->dmgType = DMG_BEAM;
|
||||
@@ -1943,7 +1943,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
if (gRingPassCount == 3) {
|
||||
Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO);
|
||||
}
|
||||
AUDIO_PLAY_SFX(D_enmy_800CFF54[gRingPassCount], gPlayer[0].sfxSource, 0);
|
||||
AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0);
|
||||
AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4);
|
||||
}
|
||||
} else if (temp_v0 < 0) {
|
||||
@@ -2061,7 +2061,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
player->unk_0D8.z = (player->unk_138 - opponent->unk_138) * 0.5f;
|
||||
opponent->unk_0D8.x = -player->unk_0D8.x;
|
||||
opponent->unk_0D8.z = -player->unk_0D8.z;
|
||||
opponent->unk_0D0 = player->unk_0D0 = 2.0f;
|
||||
opponent->baseSpeed = player->baseSpeed = 2.0f;
|
||||
} else {
|
||||
func_play_800A8804(player, opponent);
|
||||
func_play_800A8804(opponent, player);
|
||||
@@ -2073,7 +2073,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
if (D_ctx_80178294 != 0) {
|
||||
if (func_play_800A73E4(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) {
|
||||
if (gCurrentLevel == LEVEL_ZONESS) {
|
||||
player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.8f;
|
||||
player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.8f;
|
||||
player->unk_1F4 = 15;
|
||||
func_effect_8007B228(player->hit4.x, sp94, player->hit4.z, 1.0f);
|
||||
} else {
|
||||
@@ -2081,7 +2081,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
Player_ApplyDamage(player, 4, 10);
|
||||
}
|
||||
player->unk_0D8.y = 30.0f;
|
||||
player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.8f;
|
||||
player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.8f;
|
||||
}
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_DOWN) {
|
||||
player->timer_220 = 2;
|
||||
@@ -2152,7 +2152,7 @@ void func_play_800AA800(Player* player) {
|
||||
if (player->unk_240 == 0) {
|
||||
player->unk_064 = player->pos.x;
|
||||
player->unk_06C = player->unk_138 - player->pos.y;
|
||||
if (D_ctx_801784AC != 4) {
|
||||
if (gGroundType != 4) {
|
||||
if (gCamCount == 1) {
|
||||
player->unk_068 = gGroundHeight + 3.0f;
|
||||
} else {
|
||||
@@ -2383,7 +2383,7 @@ void func_play_800AB334(void) {
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_TRAINING:
|
||||
AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_28);
|
||||
D_ctx_8017796C = -1;
|
||||
gTeamLowHealthMsgTimer = -1;
|
||||
break;
|
||||
case LEVEL_VENOM_1:
|
||||
AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_6);
|
||||
@@ -2394,7 +2394,7 @@ void func_play_800AB334(void) {
|
||||
case LEVEL_VENOM_ANDROSS:
|
||||
AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_15);
|
||||
Audio_SetEnvSfxReverb(0);
|
||||
D_ctx_8017796C = -1;
|
||||
gTeamLowHealthMsgTimer = -1;
|
||||
break;
|
||||
}
|
||||
D_ctx_80178294 = 0;
|
||||
@@ -2514,7 +2514,7 @@ void func_play_800AB964(void) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
D_versus_80178754 = 0;
|
||||
gVsMatchState = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
D_ctx_80177DB8[i] = 0;
|
||||
for (j = 0; j < 10; j++) {
|
||||
@@ -2543,7 +2543,7 @@ void func_play_800ABA08(void) {
|
||||
void Play_Init(void) {
|
||||
s32 i;
|
||||
|
||||
D_play_80161A54 = 40.0f;
|
||||
gArwingSpeed = 40.0f;
|
||||
for (i = 0; i < 4; i++) {
|
||||
gControllerRumbleEnabled[i] = 0;
|
||||
}
|
||||
@@ -2574,7 +2574,7 @@ void Play_Init(void) {
|
||||
D_display_800CA230 = D_800D2F58 = 0.0f;
|
||||
gLevelMode = LEVELMODE_ON_RAILS;
|
||||
D_ctx_80177CE8 = D_bg_8015F968 = 0.0f;
|
||||
D_hud_800D1970 = gVersusMode = D_ctx_80178300 = gChangeTo360 = 0;
|
||||
D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = 0;
|
||||
if (gCurrentLevel >= LEVEL_FORTUNA) {
|
||||
gLevelMode = LEVELMODE_ALL_RANGE;
|
||||
if (gCurrentLevel == LEVEL_VERSUS) {
|
||||
@@ -2587,14 +2587,14 @@ void Play_Init(void) {
|
||||
}
|
||||
D_ctx_80177E7C = 0;
|
||||
func_play_800A594C();
|
||||
gDropHitCountItem = D_ctx_8017796C = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer =
|
||||
gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer =
|
||||
gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount =
|
||||
gCallTimer = gAllRangeSupplyTimer = gMissionStatus = 0;
|
||||
|
||||
if (gCurrentLevel == LEVEL_SECTOR_X) {
|
||||
gMissionStatus = MISSION_ACCOMPLISHED;
|
||||
}
|
||||
D_ctx_80177CC0 = -25000.0f;
|
||||
gWaterLevel = -25000.0f;
|
||||
D_ctx_80177950 = 1.0f;
|
||||
if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) {
|
||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
|
||||
@@ -2622,8 +2622,8 @@ void Play_Init(void) {
|
||||
gStarCount = 0;
|
||||
}
|
||||
gFogAlpha = 255;
|
||||
D_ctx_801784E8 = 5.0f;
|
||||
D_ctx_80178510 = 5.0f;
|
||||
gLight1rotStep = 5.0f;
|
||||
gLight2rotStep = 5.0f;
|
||||
D_ctx_80178538 = 5.0f;
|
||||
Play_ClearObjectData();
|
||||
D_ctx_801782C8 = 0;
|
||||
@@ -2631,7 +2631,7 @@ void Play_Init(void) {
|
||||
Ground_801B5110(0.0f, 0.0f, 200.0f);
|
||||
}
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
D_ctx_80177CC0 = 1000.0f;
|
||||
gWaterLevel = 1000.0f;
|
||||
}
|
||||
gLoadLevelObjects = false;
|
||||
gCamCount = 1;
|
||||
@@ -2694,7 +2694,7 @@ void Play_Init(void) {
|
||||
break;
|
||||
case LEVEL_VERSUS:
|
||||
func_play_800A4F7C();
|
||||
D_ctx_8017796C = -1;
|
||||
gTeamLowHealthMsgTimer = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3232,13 +3232,13 @@ void func_play_800ADF58(Player* player) {
|
||||
D_ctx_80177D08 = -player->vel.z;
|
||||
D_ctx_80177D20 = player->unk_144;
|
||||
D_ctx_80177CE8 += player->unk_140;
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
D_ctx_80177CC8 = player->unk_140;
|
||||
}
|
||||
if ((gBossActive == 0) && (player->unk_144 > 500000.0f)) {
|
||||
player->unk_144 = 0.0f;
|
||||
player->pos.z = 0.0f;
|
||||
D_ctx_80177DC8 = 0;
|
||||
gObjectLoadIndex = 0;
|
||||
Play_ClearObjectData();
|
||||
}
|
||||
player->unk_138 = player->pos.z + player->unk_08C;
|
||||
@@ -3430,7 +3430,7 @@ void func_play_800AE4A4(Player* player) {
|
||||
sp4C.x += 2.5f;
|
||||
sp4C.y -= 2.5f;
|
||||
}
|
||||
sp4C.z = player->unk_0D0 + player->unk_110;
|
||||
sp4C.z = player->baseSpeed + player->boostSpeed;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40);
|
||||
player->vel.x = sp40.x;
|
||||
player->vel.z = sp40.z;
|
||||
@@ -3513,7 +3513,7 @@ void func_play_800AECAC(Player* player) {
|
||||
Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY);
|
||||
sp4C.x = 0.0f;
|
||||
sp4C.y = 0.0f;
|
||||
sp4C.z = player->unk_0D0;
|
||||
sp4C.z = player->baseSpeed;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40);
|
||||
player->vel.x = sp40.x;
|
||||
player->vel.z = sp40.z;
|
||||
@@ -3644,7 +3644,7 @@ void func_play_800AF07C(Player* player) {
|
||||
|
||||
sp68.x = 0.0f;
|
||||
sp68.y = 0.0f;
|
||||
sp68.z = player->unk_0D0;
|
||||
sp68.z = player->baseSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp44);
|
||||
|
||||
@@ -3657,7 +3657,7 @@ void func_play_800AF07C(Player* player) {
|
||||
|
||||
sp68.x = 0.0f;
|
||||
sp68.y = 0.0f;
|
||||
sp68.z = -player->unk_110;
|
||||
sp68.z = -player->boostSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50);
|
||||
|
||||
@@ -3670,7 +3670,7 @@ void func_play_800AF07C(Player* player) {
|
||||
}
|
||||
sp68.x = 0.0f;
|
||||
sp68.y = 0.0f;
|
||||
sp68.z = -player->unk_110;
|
||||
sp68.z = -player->boostSpeed;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50);
|
||||
|
||||
@@ -3791,17 +3791,17 @@ void func_play_800AF928(Player* player) {
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY);
|
||||
sp44.x = 0.0f;
|
||||
sp44.y = 0.0f;
|
||||
sp44.z = player->unk_0D0;
|
||||
sp44.z -= fabsf((player->unk_184 * 0.4f * player->unk_0D0) / 15.0f);
|
||||
sp44.z += SIN_DEG(player->unk_000) * player->unk_110;
|
||||
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;
|
||||
player->vel.z = sp38.z;
|
||||
if (player->unk_16C > 0.2f) {
|
||||
Math_SmoothStepToF(&player->unk_184, player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0);
|
||||
Math_SmoothStepToF(&player->unk_184, player->baseSpeed * 0.5f, 1.0f, 1.0f, 0);
|
||||
}
|
||||
if (player->unk_170 > 0.2f) {
|
||||
Math_SmoothStepToF(&player->unk_184, -player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0);
|
||||
Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0);
|
||||
}
|
||||
if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && (player->unk_1D4 != 0)) {
|
||||
Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f);
|
||||
@@ -3848,7 +3848,7 @@ void func_play_800AF928(Player* player) {
|
||||
player->unk_138 = player->pos.z;
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
if (player->unk_1D4 != 0) {
|
||||
player->unk_0F4 += player->unk_0D0 * 5.0f;
|
||||
player->unk_0F4 += player->baseSpeed * 5.0f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f;
|
||||
}
|
||||
func_play_800A46A0(player);
|
||||
@@ -3867,7 +3867,7 @@ void func_play_800B00C0(Player* player) {
|
||||
sp28 = D_800D30F4[gPlayerNum];
|
||||
sp24 = D_800D3104[gPlayerNum];
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_0D0, sp2C, 1.0f, 1.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, sp2C, 1.0f, 1.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->unk_008, sp28, 0.1f, sp24, 0.00001f);
|
||||
}
|
||||
|
||||
@@ -3907,7 +3907,7 @@ void func_play_800B0194(Player* player) {
|
||||
sp74 = gInputPress->stick_x;
|
||||
sp70 = gInputPress->stick_y;
|
||||
Math_SmoothStepToF(&player->unk_0E8, -sp74 * D_ctx_80177970 * 0.6f, 0.5f, D_ctx_80177968, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_0EC, -sp74 * D_ctx_80177970 * 0.2f * player->unk_0D0 / 15.0f, 0.2f, 5.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_0EC, -sp74 * D_ctx_80177970 * 0.2f * player->baseSpeed / 15.0f, 0.2f, 5.0f, 0.001f);
|
||||
player->unk_0F8 = player->unk_0EC;
|
||||
if ((sp74 != 0.0f) || (sp70 != 0.0f)) {
|
||||
Math_SmoothStepToF(&player->unk_15C, sp74 * D_ctx_80177970, 0.9f, 2.0f * D_ctx_80177968, 0.1f);
|
||||
@@ -3928,7 +3928,7 @@ void func_play_800B0194(Player* player) {
|
||||
Math_SmoothStepToF(&player->unk_168, player->unk_178, 0.1f, 10.0f, 0.00001f);
|
||||
}
|
||||
player->unk_108 = player->unk_0E8;
|
||||
if (player->unk_0D0 < 1.5f) {
|
||||
if (player->baseSpeed < 1.5f) {
|
||||
var_fv0 = 0.12f;
|
||||
var_fa0 = 3.0f;
|
||||
} else {
|
||||
@@ -3943,7 +3943,7 @@ void func_play_800B0194(Player* player) {
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY);
|
||||
sp58.x = 0.0f;
|
||||
sp58.y = 0.0f;
|
||||
sp58.z = player->unk_0D0;
|
||||
sp58.z = player->baseSpeed;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C);
|
||||
player->vel.x = sp4C.x;
|
||||
player->vel.z = sp4C.z;
|
||||
@@ -3955,7 +3955,7 @@ void func_play_800B0194(Player* player) {
|
||||
Math_SmoothStepToAngle(&player->unk_0FC, player->unk_104, 0.15f, 15.0f, 0.005f);
|
||||
Math_SmoothStepToAngle(&player->unk_100, player->unk_10C, 0.15f, 15.0f, 0.005f);
|
||||
if (player->unk_1D4 != 0) {
|
||||
if (player->unk_0D0 > 1.0f) {
|
||||
if (player->baseSpeed > 1.0f) {
|
||||
player->unk_00C += player->unk_008;
|
||||
if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) {
|
||||
player->unk_00C = 0.0f;
|
||||
@@ -3984,9 +3984,9 @@ void func_play_800B0194(Player* player) {
|
||||
if (player->unk_010 < 50.0f) {
|
||||
player->unk_010 += 2.0f;
|
||||
}
|
||||
sp64 = player->unk_0D0;
|
||||
sp64 = player->baseSpeed;
|
||||
if (gGameFrameCount & 4) {
|
||||
sp64 = 2.0f * player->unk_0D0;
|
||||
sp64 = 2.0f * player->baseSpeed;
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_164, sp64, 0.5f, 20.0f, 0.0001f);
|
||||
Math_SmoothStepToF(&player->unk_168, sp64, 0.5f, 20.0f, 0.0001f);
|
||||
@@ -4104,13 +4104,14 @@ void func_play_800B0F50(Player* playerx) {
|
||||
D_Timer_80177A88[gPlayerNum] = gShieldTimer[gPlayerNum] = gHasShield[gPlayerNum] = gChargeTimers[gPlayerNum] =
|
||||
gVsLockOnTimers[gPlayerNum][0] = gVsLockOnTimers[gPlayerNum][1] = gVsLockOnTimers[gPlayerNum][2] =
|
||||
gVsLockOnTimers[gPlayerNum][3] = 0;
|
||||
D_ctx_80177D40[gPlayerNum] = D_ctx_80177D58[gPlayerNum] = D_ctx_80177D70[gPlayerNum] = D_ctx_80177D88[gPlayerNum] =
|
||||
D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] = D_ctx_80177AA0[gPlayerNum] = 0.0f;
|
||||
gRightWingFlashTimer[gPlayerNum] = gLeftWingFlashTimer[gPlayerNum] = gRightWingDebrisTimer[gPlayerNum] =
|
||||
gLeftWingDebrisTimer[gPlayerNum] = D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] =
|
||||
D_ctx_80177AA0[gPlayerNum] = 0.0f;
|
||||
gShieldAlpha[gPlayerNum] = 0.0f;
|
||||
player->unk_190 = 1.0f;
|
||||
player->unk_194 = 1.0f;
|
||||
gRadioState = D_ctx_80177D68 = D_ctx_801782A4 = 0;
|
||||
D_ctx_8017853C = D_ctx_80177D50 = 0.0f;
|
||||
gRadioState = gRadioMsgRadioId = gCurrentRadioPortrait = 0;
|
||||
D_ctx_8017853C = gRadioTextBoxScaleY = 0.0f;
|
||||
player->cam.eye.z = 400.0f;
|
||||
player->unk_148 = 0.77699995f;
|
||||
player->unk_14C = 0.77699995f;
|
||||
@@ -4134,7 +4135,7 @@ void func_play_800B0F50(Player* playerx) {
|
||||
player->unk_0A4 = gGroundHeight + 40.0f;
|
||||
player->unk_0A8 = 3000.0f;
|
||||
}
|
||||
player->unk_0D0 = D_play_80161A54;
|
||||
player->baseSpeed = gArwingSpeed;
|
||||
player->pos.y = 350.0f;
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_MACBETH:
|
||||
@@ -4143,7 +4144,7 @@ void func_play_800B0F50(Player* playerx) {
|
||||
player->unk_014 = 1.0f;
|
||||
player->unk_14C = 0.67f;
|
||||
player->unk_148 = 0.67f;
|
||||
player->unk_0D0 = 15.0f;
|
||||
player->baseSpeed = 15.0f;
|
||||
player->unk_0D4 = 3.0f;
|
||||
player->unk_09C = 500.0f;
|
||||
player->unk_0A0 = 500.0f;
|
||||
@@ -4158,7 +4159,7 @@ void func_play_800B0F50(Player* playerx) {
|
||||
player->form = FORM_BLUE_MARINE;
|
||||
player->unk_0D4 = 0.0f;
|
||||
player->unk_09C = 700.0f;
|
||||
player->unk_0D0 = 20.0f;
|
||||
player->baseSpeed = 20.0f;
|
||||
player->unk_0A0 = 720.0f;
|
||||
player->unk_0A4 = gGroundHeight + 30.0f;
|
||||
break;
|
||||
@@ -4168,7 +4169,7 @@ void func_play_800B0F50(Player* playerx) {
|
||||
break;
|
||||
}
|
||||
if (gCurrentLevel != LEVEL_CORNERIA) {
|
||||
gSavedGroundType = GROUNDTYPE_GRASS;
|
||||
gSavedGroundSurface = SURFACE_GRASS;
|
||||
}
|
||||
gGoldRingCount[0] = D_ctx_80161A94[0];
|
||||
do {
|
||||
@@ -4201,15 +4202,15 @@ void func_play_800B0F50(Player* playerx) {
|
||||
gDisplayedHitCount = gHitCount;
|
||||
D_hud_80161730 = 0;
|
||||
gMissedZoSearchlight = gSavedZoSearchlightStatus;
|
||||
D_ctx_80177DC8 = D_ctx_80177CA0;
|
||||
gGroundType = gSavedGroundType;
|
||||
gObjectLoadIndex = gSavedObjectLoadIndex;
|
||||
gGroundSurface = gSavedGroundSurface;
|
||||
D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0;
|
||||
player->pos.z = player->unk_138 = -player->unk_144;
|
||||
if ((D_ctx_80177CA0 > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||
if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||
if (gCurrentLevel == LEVEL_MACBETH) {
|
||||
sp2E = D_ctx_80177DC8;
|
||||
sp2E = gObjectLoadIndex;
|
||||
Macbeth_801AD080();
|
||||
D_ctx_80177DC8 = sp2E;
|
||||
gObjectLoadIndex = sp2E;
|
||||
}
|
||||
func_enmy_80062568();
|
||||
}
|
||||
@@ -4234,12 +4235,12 @@ void func_play_800B0F50(Player* playerx) {
|
||||
break;
|
||||
case FORM_LANDMASTER:
|
||||
player->pos.y = 0.0f;
|
||||
player->unk_0D0 = 15.0f;
|
||||
player->baseSpeed = 15.0f;
|
||||
player->unk_0D4 = 3.0f;
|
||||
break;
|
||||
case FORM_ON_FOOT:
|
||||
player->pos.y = 0.0f;
|
||||
player->unk_0D0 = 15.0f;
|
||||
player->baseSpeed = 15.0f;
|
||||
player->unk_068 = 0;
|
||||
switch (gPlayerNum) {
|
||||
case 0:
|
||||
@@ -4282,7 +4283,7 @@ void func_play_800B0F50(Player* playerx) {
|
||||
player->unk_014 = 1.0f;
|
||||
player->unk_018 = 1.0f;
|
||||
}
|
||||
if ((D_ctx_8017782C != 0) && (D_ctx_80177CA0 == 0)) {
|
||||
if ((D_ctx_8017782C != 0) && (gSavedObjectLoadIndex == 0)) {
|
||||
gLeveLClearStatus[gCurrentLevel] = 0;
|
||||
for (j = 0; j < 10; j++) {
|
||||
D_ctx_80177A10[j] = 0;
|
||||
@@ -4294,7 +4295,7 @@ void func_play_800B0F50(Player* playerx) {
|
||||
case LEVEL_CORNERIA:
|
||||
player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO;
|
||||
player->unk_204 = 1;
|
||||
gGroundType = gSavedGroundType = GROUNDTYPE_WATER;
|
||||
gGroundSurface = gSavedGroundSurface = SURFACE_WATER;
|
||||
func_play_800A3FB0();
|
||||
break;
|
||||
case LEVEL_BOLSE:
|
||||
@@ -4329,13 +4330,13 @@ void func_play_800B0F50(Player* playerx) {
|
||||
D_ctx_80177A98 = 1;
|
||||
}
|
||||
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (D_ctx_80177CA0 == 0)) {
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (gSavedObjectLoadIndex == 0)) {
|
||||
player->pos.z = -4115.0f;
|
||||
D_ctx_80177D20 = player->unk_144 = 3932.0f;
|
||||
|
||||
D_ctx_80177DC8 = 40;
|
||||
gObjectLoadIndex = 40;
|
||||
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
|
||||
for (objInit = gLevelObjects, i = 0; i < D_ctx_80177DC8; i++, objInit++) {
|
||||
for (objInit = gLevelObjects, i = 0; i < gObjectLoadIndex; i++, objInit++) {
|
||||
Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
|
||||
}
|
||||
Macbeth_801ACFBC();
|
||||
@@ -4636,7 +4637,7 @@ void func_play_800B2574(Player* player) {
|
||||
if (gRingPassCount > 0) {
|
||||
Math_SmoothStepToF(&D_ctx_801779A8[player->num], gRingPassCount * 10.0f, 1.0f, 5.0f, 0.0f);
|
||||
}
|
||||
player->unk_110 += 0.3f;
|
||||
player->boostSpeed += 0.3f;
|
||||
Math_SmoothStepToF(&player->unk_08C, -130.0f, 0.2f, 10.0f, 0.0f);
|
||||
player->unk_130 -= player->unk_258;
|
||||
player->unk_258 = player->unk_258 + 0.2f;
|
||||
@@ -4688,9 +4689,9 @@ void func_play_800B2574(Player* player) {
|
||||
player->unk_25C = 0.6f;
|
||||
}
|
||||
player->unk_190 = 2.0f;
|
||||
player->unk_110 += 2.0f;
|
||||
if (player->unk_110 > 30.0f) {
|
||||
player->unk_110 = 30.0f;
|
||||
player->boostSpeed += 2.0f;
|
||||
if (player->boostSpeed > 30.0f) {
|
||||
player->boostSpeed = 30.0f;
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_08C, -400.0f, 0.1f, 30.0f, 0.0f);
|
||||
player->sfx.boost = 1;
|
||||
@@ -4703,10 +4704,10 @@ void func_play_800B2574(Player* player) {
|
||||
player->boostCooldown = false;
|
||||
}
|
||||
}
|
||||
if (player->unk_110 > 0.0f) {
|
||||
player->unk_110 -= 1.0f;
|
||||
if (player->unk_110 < 0.0f) {
|
||||
player->unk_110 = 0.0f;
|
||||
if (player->boostSpeed > 0.0f) {
|
||||
player->boostSpeed -= 1.0f;
|
||||
if (player->boostSpeed < 0.0f) {
|
||||
player->boostSpeed = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4775,9 +4776,9 @@ void func_play_800B2C00(Player* player) {
|
||||
player->boostMeter = 90.0f;
|
||||
}
|
||||
player->unk_190 = 0.3f;
|
||||
player->unk_110 -= 1.0f;
|
||||
if (player->unk_110 < -20.0f) {
|
||||
player->unk_110 = -20.0f;
|
||||
player->boostSpeed -= 1.0f;
|
||||
if (player->boostSpeed < -20.0f) {
|
||||
player->boostSpeed = -20.0f;
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, 10.0f, 0.0f);
|
||||
player->sfx.brake = 1;
|
||||
@@ -4788,10 +4789,10 @@ void func_play_800B2C00(Player* player) {
|
||||
player->boostMeter = 0.0f;
|
||||
player->boostCooldown = false;
|
||||
}
|
||||
if (player->unk_110 < 0.0f) {
|
||||
player->unk_110 += 0.5f;
|
||||
if (player->unk_110 > 0.0f) {
|
||||
player->unk_110 = 0.0f;
|
||||
if (player->boostSpeed < 0.0f) {
|
||||
player->boostSpeed += 0.5f;
|
||||
if (player->boostSpeed > 0.0f) {
|
||||
player->boostSpeed = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4839,7 +4840,7 @@ void func_play_800B3010(Player* player) {
|
||||
player->boostCooldown = true;
|
||||
}
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_0D0, sp2C, 0.1f, 2.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, sp2C, 0.1f, 2.0f, 0.001f);
|
||||
}
|
||||
|
||||
void func_play_800B3314(Player* player) {
|
||||
@@ -4907,7 +4908,7 @@ void func_play_800B3314(Player* player) {
|
||||
Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.05f, 5.0f, 0.00001f);
|
||||
temp = gInputPress->stick_y;
|
||||
Math_SmoothStepToF(&player->unk_000, temp * 0.5f, 0.05f, 5.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->unk_110, 30.0f, 0.5f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->boostSpeed, 30.0f, 0.5f, 5.0f, 0.0f);
|
||||
player->unk_0D4 = -0.4f;
|
||||
Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f);
|
||||
if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) {
|
||||
@@ -4959,23 +4960,23 @@ void func_play_800B39E0(Player* player) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (D_ctx_80177D40[player->num] != 0) {
|
||||
D_ctx_80177D40[player->num]--;
|
||||
if (D_ctx_80177D40[player->num] == 1000) {
|
||||
D_ctx_80177D40[player->num] = 0;
|
||||
if (gRightWingFlashTimer[player->num] != 0) {
|
||||
gRightWingFlashTimer[player->num]--;
|
||||
if (gRightWingFlashTimer[player->num] == 1000) {
|
||||
gRightWingFlashTimer[player->num] = 0;
|
||||
}
|
||||
}
|
||||
if (D_ctx_80177D58[player->num] != 0) {
|
||||
D_ctx_80177D58[player->num]--;
|
||||
if (D_ctx_80177D58[player->num] == 1000) {
|
||||
D_ctx_80177D58[player->num] = 0;
|
||||
if (gLeftWingFlashTimer[player->num] != 0) {
|
||||
gLeftWingFlashTimer[player->num]--;
|
||||
if (gLeftWingFlashTimer[player->num] == 1000) {
|
||||
gLeftWingFlashTimer[player->num] = 0;
|
||||
}
|
||||
}
|
||||
if (D_ctx_80177D88[player->num] != 0) {
|
||||
D_ctx_80177D88[player->num]--;
|
||||
if (gLeftWingDebrisTimer[player->num] != 0) {
|
||||
gLeftWingDebrisTimer[player->num]--;
|
||||
}
|
||||
if (D_ctx_80177D70[player->num] != 0) {
|
||||
D_ctx_80177D70[player->num]--;
|
||||
if (gRightWingDebrisTimer[player->num] != 0) {
|
||||
gRightWingDebrisTimer[player->num]--;
|
||||
}
|
||||
if (gShieldTimer[player->num] != 0) {
|
||||
gShieldTimer[player->num]--;
|
||||
@@ -5028,7 +5029,7 @@ void func_play_800B39E0(Player* player) {
|
||||
player->boostCooldown = true;
|
||||
player->unk_0E4 = 0;
|
||||
player->unk_0E8 = 0;
|
||||
Math_SmoothStepToF(&player->unk_110, 0, 1.0f, 5.0f, 0);
|
||||
Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0);
|
||||
}
|
||||
if (player->unk_1F4 == 0) {
|
||||
player->unk_134 = 0;
|
||||
@@ -5247,10 +5248,10 @@ void func_play_800B44C4(Player* player) {
|
||||
void func_play_800B46F8(Player* player) {
|
||||
s32 teamId;
|
||||
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_8017796C >= 0)) {
|
||||
D_ctx_8017796C++;
|
||||
if (D_ctx_8017796C > 32 * 30) {
|
||||
D_ctx_8017796C = 0;
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gTeamLowHealthMsgTimer >= 0)) {
|
||||
gTeamLowHealthMsgTimer++;
|
||||
if (gTeamLowHealthMsgTimer > 32 * 30) {
|
||||
gTeamLowHealthMsgTimer = 0;
|
||||
if (1) {}
|
||||
if ((player->shields < 64) && ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0) ||
|
||||
(gTeamShields[TEAM_ID_SLIPPY] > 0))) {
|
||||
@@ -5925,7 +5926,7 @@ void func_play_800B6BFC(Player* player, s32 arg1) {
|
||||
player->unk_134 * 0.1f;
|
||||
player->cam.at.z = player->pos.z;
|
||||
|
||||
Math_SmoothStepToF(&player->unk_028, player->unk_0E8 * (player->unk_0D0 + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f);
|
||||
Math_SmoothStepToF(&player->unk_028, player->unk_0E8 * (player->baseSpeed + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f);
|
||||
sp64.x = -player->unk_028;
|
||||
sp64.y = 0.0f;
|
||||
sp64.z = 0.0f;
|
||||
@@ -6051,70 +6052,70 @@ void func_play_800B73E0(Player* player) {
|
||||
f32 pad;
|
||||
|
||||
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 110.0f;
|
||||
gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 110.0f;
|
||||
if (gGameFrameCount & 0x20) {
|
||||
D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 90.0f;
|
||||
gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 90.0f;
|
||||
}
|
||||
D_ctx_801784E8 = D_ctx_80178510 = D_ctx_80178538 = 1.0f;
|
||||
gLight1rotStep = gLight2rotStep = D_ctx_80178538 = 1.0f;
|
||||
}
|
||||
Math_SmoothStepToAngle(&D_ctx_801784B8, D_ctx_801784C4, 1.0f, D_ctx_801784E8, 0.0f);
|
||||
Math_SmoothStepToAngle(&D_ctx_801784BC, D_ctx_801784C8, 1.0f, D_ctx_801784E8, 0.0f);
|
||||
Math_SmoothStepToAngle(&D_ctx_801784C0, D_ctx_801784CC, 1.0f, D_ctx_801784E8, 0.0f);
|
||||
Math_SmoothStepToAngle(&gLight1xRot, gLight1xRotTarget, 1.0f, gLight1rotStep, 0.0f);
|
||||
Math_SmoothStepToAngle(&gLight1yRot, gLight1yRotTarget, 1.0f, gLight1rotStep, 0.0f);
|
||||
Math_SmoothStepToAngle(&gLight1zRot, gLight1zRotTarget, 1.0f, gLight1rotStep, 0.0f);
|
||||
|
||||
if (gLight2R < D_ctx_80178570) {
|
||||
gLight2R += D_ctx_80178540;
|
||||
if (D_ctx_80178570 < gLight2R) {
|
||||
gLight2R = D_ctx_80178570;
|
||||
if (gLight2R < gLight2RTarget) {
|
||||
gLight2R += gLight2colorStep;
|
||||
if (gLight2RTarget < gLight2R) {
|
||||
gLight2R = gLight2RTarget;
|
||||
}
|
||||
}
|
||||
if (D_ctx_80178570 < gLight2R) {
|
||||
gLight2R -= D_ctx_80178540;
|
||||
if (gLight2R < D_ctx_80178570) {
|
||||
gLight2R = D_ctx_80178570;
|
||||
if (gLight2RTarget < gLight2R) {
|
||||
gLight2R -= gLight2colorStep;
|
||||
if (gLight2R < gLight2RTarget) {
|
||||
gLight2R = gLight2RTarget;
|
||||
}
|
||||
}
|
||||
if (gLight2G < D_ctx_80178574) {
|
||||
gLight2G += D_ctx_80178540;
|
||||
if (D_ctx_80178574 < gLight2G) {
|
||||
gLight2G = D_ctx_80178574;
|
||||
if (gLight2G < gLight2GTarget) {
|
||||
gLight2G += gLight2colorStep;
|
||||
if (gLight2GTarget < gLight2G) {
|
||||
gLight2G = gLight2GTarget;
|
||||
}
|
||||
}
|
||||
if (D_ctx_80178574 < gLight2G) {
|
||||
gLight2G -= D_ctx_80178540;
|
||||
if (gLight2G < D_ctx_80178574) {
|
||||
gLight2G = D_ctx_80178574;
|
||||
if (gLight2GTarget < gLight2G) {
|
||||
gLight2G -= gLight2colorStep;
|
||||
if (gLight2G < gLight2GTarget) {
|
||||
gLight2G = gLight2GTarget;
|
||||
}
|
||||
}
|
||||
if (gLight2B < D_ctx_80178578) {
|
||||
gLight2B += D_ctx_80178540;
|
||||
if (D_ctx_80178578 < gLight2B) {
|
||||
gLight2B = D_ctx_80178578;
|
||||
if (gLight2B < gLight2BTarget) {
|
||||
gLight2B += gLight2colorStep;
|
||||
if (gLight2BTarget < gLight2B) {
|
||||
gLight2B = gLight2BTarget;
|
||||
}
|
||||
}
|
||||
if (D_ctx_80178578 < gLight2B) {
|
||||
gLight2B -= D_ctx_80178540;
|
||||
if (gLight2B < D_ctx_80178578) {
|
||||
gLight2B = D_ctx_80178578;
|
||||
if (gLight2BTarget < gLight2B) {
|
||||
gLight2B -= gLight2colorStep;
|
||||
if (gLight2B < gLight2BTarget) {
|
||||
gLight2B = gLight2BTarget;
|
||||
}
|
||||
}
|
||||
Math_SmoothStepToAngle(&D_ctx_801784EC, D_ctx_801784F8, 1.0f, D_ctx_80178510, 0.0f);
|
||||
Math_SmoothStepToAngle(&D_ctx_801784F0, D_ctx_801784FC, 1.0f, D_ctx_80178510, 0.0f);
|
||||
Math_SmoothStepToAngle(&D_ctx_801784F4, D_ctx_80178500, 1.0f, D_ctx_80178510, 0.0f);
|
||||
D_ctx_801784F8 = D_ctx_801784C4 = D_ctx_801784D0;
|
||||
D_ctx_801784FC = D_ctx_801784C8 = D_ctx_801784D4;
|
||||
D_ctx_80178500 = D_ctx_801784CC = D_ctx_801784D8;
|
||||
D_ctx_801784E8 = 5.0f;
|
||||
D_ctx_80178570 = gLight1R;
|
||||
D_ctx_80178574 = gLight1G;
|
||||
D_ctx_80178578 = gLight1B;
|
||||
Math_SmoothStepToAngle(&gLight2xRot, gLight2xRotTarget, 1.0f, gLight2rotStep, 0.0f);
|
||||
Math_SmoothStepToAngle(&gLight2yRot, gLight2yRotTarget, 1.0f, gLight2rotStep, 0.0f);
|
||||
Math_SmoothStepToAngle(&gLight2zRot, gLight2zRotTarget, 1.0f, gLight2rotStep, 0.0f);
|
||||
gLight2xRotTarget = gLight1xRotTarget = gEnvLightxRot;
|
||||
gLight2yRotTarget = gLight1yRotTarget = gEnvLightyRot;
|
||||
gLight2zRotTarget = gLight1zRotTarget = gEnvLightzRot;
|
||||
gLight1rotStep = 5.0f;
|
||||
gLight2RTarget = gLight1R;
|
||||
gLight2GTarget = gLight1G;
|
||||
gLight2BTarget = gLight1B;
|
||||
pad = player->camRoll;
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * pad, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -player->camPitch, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, player->camYaw, MTXF_APPLY);
|
||||
Matrix_Push(&gCalcMatrix);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784B8, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784BC, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784C0, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * gLight1xRot, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * gLight1yRot, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * gLight1zRot, MTXF_APPLY);
|
||||
sp44.x = 0.0f;
|
||||
sp44.y = 0.0f;
|
||||
sp44.z = 100.0f;
|
||||
@@ -6123,9 +6124,9 @@ void func_play_800B73E0(Player* player) {
|
||||
gLight1y = sp38.y;
|
||||
gLight1z = sp38.z;
|
||||
Matrix_Pop(&gCalcMatrix);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784EC, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784F0, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784F4, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * gLight2xRot, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * gLight2yRot, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * gLight2zRot, MTXF_APPLY);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
gLight2x = sp38.x;
|
||||
gLight2y = sp38.y;
|
||||
@@ -6462,7 +6463,7 @@ void Play_Main(void) {
|
||||
D_ctx_8017782C = 0;
|
||||
}
|
||||
if (gVersusMode) {
|
||||
func_versus_800C1E9C();
|
||||
Versus_Main();
|
||||
}
|
||||
if ((gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) {
|
||||
Audio_PlayPauseSfx(1);
|
||||
|
||||
+209
-207
@@ -19,36 +19,36 @@
|
||||
#include "assets/ast_title.h"
|
||||
#include "assets/ast_zoness.h"
|
||||
|
||||
u16** D_radio_80178720;
|
||||
s32 D_radio_80178724;
|
||||
s32 D_radio_80178728;
|
||||
s32 D_radio_8017872C;
|
||||
f32 D_radio_80178730;
|
||||
f32 D_radio_80178734;
|
||||
f32 D_radio_80178738;
|
||||
f32 D_radio_8017873C;
|
||||
f32 D_radio_80178740;
|
||||
u16** gRadioMsgList;
|
||||
s32 gRadioMsgListIndex;
|
||||
s32 gRadioPrintPosX;
|
||||
s32 gRadioPrintPosY;
|
||||
f32 gRadioTextBoxPosX;
|
||||
f32 gRadioTextBoxPosY;
|
||||
f32 gRadioTextBoxScaleX;
|
||||
f32 gRadioPortraitPosX;
|
||||
f32 gRadioPortraitPosY;
|
||||
|
||||
s32 gCurrentMsgPri = 0;
|
||||
s32 gRadioMsgPri = 0;
|
||||
|
||||
void func_radio_800BA760(void) {
|
||||
RCP_SetupDL_36();
|
||||
if (D_ctx_80177D50 == 1.3f) {
|
||||
D_ctx_801782F8 = Message_IsPrintingChar(D_ctx_80178308, D_ctx_801782D8);
|
||||
if (gRadioTextBoxScaleY == 1.3f) {
|
||||
gMsgCharIsPrinting = Message_IsPrintingChar(gRadioMsg, gRadioMsgCharIndex);
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_radio_800BA7BC(u16* msg, s32 priority) {
|
||||
if (priority == gCurrentMsgPri) {
|
||||
if (priority == gRadioMsgPri) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (priority < gCurrentMsgPri) {
|
||||
if (priority < gRadioMsgPri) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (gCurrentMsgPri < priority) {
|
||||
gCurrentMsgPri = priority;
|
||||
if (gRadioMsgPri < priority) {
|
||||
gRadioMsgPri = priority;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -95,57 +95,57 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) {
|
||||
return;
|
||||
}
|
||||
|
||||
gCurrentMsgPri = priority;
|
||||
D_ctx_80177D68 = character;
|
||||
gRadioMsgPri = priority;
|
||||
gRadioMsgRadioId = character;
|
||||
|
||||
if (gExpertMode && ((character == RCID_FOX) || (character == RCID_FOX_RED))) {
|
||||
D_ctx_80177D68 = RCID_FOX_EXPERT;
|
||||
gRadioMsgRadioId = RCID_FOX_EXPERT;
|
||||
}
|
||||
|
||||
if (gCurrentLevel == LEVEL_VENOM_2) {
|
||||
switch (character) {
|
||||
case RCID_WOLF:
|
||||
D_ctx_80177D68 = RCID_WOLF_2;
|
||||
gRadioMsgRadioId = RCID_WOLF_2;
|
||||
break;
|
||||
case RCID_PIGMA:
|
||||
D_ctx_80177D68 = RCID_PIGMA_2;
|
||||
gRadioMsgRadioId = RCID_PIGMA_2;
|
||||
break;
|
||||
case RCID_LEON:
|
||||
D_ctx_80177D68 = RCID_LEON_2;
|
||||
gRadioMsgRadioId = RCID_LEON_2;
|
||||
break;
|
||||
case RCID_ANDREW:
|
||||
D_ctx_80177D68 = RCID_ANDREW_2;
|
||||
gRadioMsgRadioId = RCID_ANDREW_2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
D_ctx_80178308 = msg;
|
||||
gRadioMsg = msg;
|
||||
gRadioState = 100;
|
||||
|
||||
switch (gGameState) {
|
||||
case GSTATE_TITLE:
|
||||
case GSTATE_ENDING:
|
||||
D_radio_8017872C = 176;
|
||||
D_radio_80178728 = 85;
|
||||
D_radio_80178730 = 80.0f;
|
||||
D_radio_80178734 = 174.0f;
|
||||
D_radio_80178738 = 4.63f;
|
||||
D_radio_8017873C = 32.0f;
|
||||
D_radio_80178740 = 174.0f;
|
||||
gRadioPrintPosY = 176;
|
||||
gRadioPrintPosX = 85;
|
||||
gRadioTextBoxPosX = 80.0f;
|
||||
gRadioTextBoxPosY = 174.0f;
|
||||
gRadioTextBoxScaleX = 4.63f;
|
||||
gRadioPortraitPosX = 32.0f;
|
||||
gRadioPortraitPosY = 174.0f;
|
||||
break;
|
||||
case GSTATE_PLAY:
|
||||
D_radio_8017872C = 180;
|
||||
D_radio_80178728 = 79;
|
||||
D_radio_80178730 = 74.0f;
|
||||
D_radio_80178734 = 178.0f;
|
||||
D_radio_80178738 = 4.53f;
|
||||
D_radio_8017873C = 26.0f;
|
||||
D_radio_80178740 = 178.0f;
|
||||
gRadioPrintPosY = 180;
|
||||
gRadioPrintPosX = 79;
|
||||
gRadioTextBoxPosX = 74.0f;
|
||||
gRadioTextBoxPosY = 178.0f;
|
||||
gRadioTextBoxScaleX = 4.53f;
|
||||
gRadioPortraitPosX = 26.0f;
|
||||
gRadioPortraitPosY = 178.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
D_ctx_801782E8 = Message_IdFromPtr(msg);
|
||||
Audio_PlayVoice(D_ctx_801782E8);
|
||||
gRadioMsgId = Message_IdFromPtr(msg);
|
||||
Audio_PlayVoice(gRadioMsgId);
|
||||
}
|
||||
|
||||
s32 sRadioUseRedBox;
|
||||
@@ -159,19 +159,19 @@ void func_radio_800BAAE8(void) {
|
||||
f32 temp_fa0;
|
||||
s32 j;
|
||||
|
||||
sRadioUseRedBox = 0;
|
||||
sRadioUseRedBox = false;
|
||||
|
||||
mirror = false;
|
||||
|
||||
switch (D_ctx_801782A4) {
|
||||
switch (gCurrentRadioPortrait) {
|
||||
case RCID_FOX_RED:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_FOX:
|
||||
sp44 = D_10050E0;
|
||||
break;
|
||||
case RCID_FOX_RED_OPEN:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_FOX_OPEN:
|
||||
sp44 = D_1006000;
|
||||
@@ -183,37 +183,37 @@ void func_radio_800BAAE8(void) {
|
||||
sp44 = D_1007E40;
|
||||
break;
|
||||
case RCID_FALCO_RED:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_FALCO:
|
||||
sp44 = D_10032A0;
|
||||
break;
|
||||
case RCID_FALCO_RED_OPEN:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_FALCO_OPEN:
|
||||
sp44 = D_10041C0;
|
||||
break;
|
||||
case RCID_SLIPPY_RED:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_SLIPPY:
|
||||
sp44 = D_100D900;
|
||||
break;
|
||||
case RCID_SLIPPY_RED_OPEN:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_SLIPPY_OPEN:
|
||||
sp44 = D_100E820;
|
||||
break;
|
||||
case RCID_PEPPY_RED:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_PEPPY:
|
||||
sp44 = D_100BAC0;
|
||||
break;
|
||||
case RCID_PEPPY_RED_OPEN:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_PEPPY_OPEN:
|
||||
sp44 = D_100C9E0;
|
||||
@@ -321,14 +321,14 @@ void func_radio_800BAAE8(void) {
|
||||
sp44 = D_MA_6011B40;
|
||||
break;
|
||||
case RCID_ROB64_RED:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_ROB64:
|
||||
case RCID_ROB64_2:
|
||||
sp44 = D_1009C80;
|
||||
break;
|
||||
case RCID_ROB64_RED_OPEN:
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
/* fallthrough */
|
||||
case RCID_ROB64_OPEN:
|
||||
case RCID_ROB64_2_OPEN:
|
||||
@@ -346,7 +346,7 @@ void func_radio_800BAAE8(void) {
|
||||
if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) {
|
||||
sp44 = D_A6_6000B60;
|
||||
}
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
break;
|
||||
case RCID_ANDROSS_RED_OPEN:
|
||||
case RCID_ANDROSS_OPEN:
|
||||
@@ -354,7 +354,7 @@ void func_radio_800BAAE8(void) {
|
||||
if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) {
|
||||
sp44 = D_A6_6001A80;
|
||||
}
|
||||
sRadioUseRedBox = 1;
|
||||
sRadioUseRedBox = true;
|
||||
break;
|
||||
case RCID_JAMES:
|
||||
sp44 = D_D005C30;
|
||||
@@ -408,39 +408,41 @@ void func_radio_800BAAE8(void) {
|
||||
sp44 = gTitleRadioStatic;
|
||||
break;
|
||||
}
|
||||
if (((s32) D_ctx_80177D68 == RCID_ANDROSS) || ((s32) D_ctx_80177D68 == RCID_ANDROSS_RED)) {
|
||||
sRadioUseRedBox = 1;
|
||||
if (((s32) gRadioMsgRadioId == RCID_ANDROSS) || ((s32) gRadioMsgRadioId == RCID_ANDROSS_RED)) {
|
||||
sRadioUseRedBox = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((sp44 != NULL) && (D_ctx_80177D38 != 0.0f)) {
|
||||
temp_fa0 = (2.0f * D_ctx_80177D38) + D_radio_80178740;
|
||||
if ((D_radio_80178740 + 20.0f) <= temp_fa0) {
|
||||
if ((sp44 != NULL) && (gRadioPortraitScaleY != 0.0f)) {
|
||||
temp_fa0 = (2.0f * gRadioPortraitScaleY) + gRadioPortraitPosY;
|
||||
if ((gRadioPortraitPosY + 20.0f) <= temp_fa0) {
|
||||
D_800D4A74 = 1.0f;
|
||||
}
|
||||
if (temp_fa0 <= D_radio_80178740) {
|
||||
if (temp_fa0 <= gRadioPortraitPosY) {
|
||||
D_800D4A74 = -1.0f;
|
||||
}
|
||||
sp38 = D_ctx_80177D38 * 20.0f * D_800D4A74;
|
||||
sp38 = gRadioPortraitScaleY * 20.0f * D_800D4A74;
|
||||
RCP_SetupDL_76();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
|
||||
if (mirror) {
|
||||
for (i = 0, j = 0; i < 2; i++, j += 44 * 20) {
|
||||
TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[j], 44, 20, D_radio_8017873C,
|
||||
D_radio_80178740 + 20.0f + sp38 + (i * 20.0f * D_ctx_80177D38), 1.0f,
|
||||
D_ctx_80177D38);
|
||||
TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[j], 44, 20, gRadioPortraitPosX,
|
||||
gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f,
|
||||
gRadioPortraitScaleY);
|
||||
}
|
||||
TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, D_radio_8017873C,
|
||||
D_radio_80178740 + 20.0f + sp38 + (40.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38);
|
||||
TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, gRadioPortraitPosX,
|
||||
gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f,
|
||||
gRadioPortraitScaleY);
|
||||
} else {
|
||||
for (i = 0, j = 0; i < 2; i++, j += 44 * 20) {
|
||||
TextureRect_16bRGBA(&gMasterDisp, &sp44[j], 44, 20, D_radio_8017873C,
|
||||
D_radio_80178740 + 20.0f + sp38 + (i * 20.0f * D_ctx_80177D38), 1.0f,
|
||||
D_ctx_80177D38);
|
||||
TextureRect_16bRGBA(&gMasterDisp, &sp44[j], 44, 20, gRadioPortraitPosX,
|
||||
gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f,
|
||||
gRadioPortraitScaleY);
|
||||
}
|
||||
TextureRect_16bRGBA(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, D_radio_8017873C,
|
||||
D_radio_80178740 + 20.0f + sp38 + (40.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38);
|
||||
TextureRect_16bRGBA(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, gRadioPortraitPosX,
|
||||
gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f,
|
||||
gRadioPortraitScaleY);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -452,12 +454,12 @@ void func_radio_800BB388(void) {
|
||||
u16* sp34;
|
||||
f32 sp30;
|
||||
|
||||
if ((gGameState != GSTATE_MAP) && (D_ctx_80177D50 != 0.0f)) {
|
||||
temp_fa0 = (D_ctx_80177D50 / 0.26f) * 3.0f;
|
||||
if ((D_radio_80178734 + 16.0f) <= temp_fa0 + D_radio_80178734) {
|
||||
if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) {
|
||||
temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f;
|
||||
if ((gRadioTextBoxPosY + 16.0f) <= temp_fa0 + gRadioTextBoxPosY) {
|
||||
D_800D4A78 = 1.0f;
|
||||
}
|
||||
if (temp_fa0 + D_radio_80178734 <= D_radio_80178734) {
|
||||
if (temp_fa0 + gRadioTextBoxPosY <= gRadioTextBoxPosY) {
|
||||
D_800D4A78 = -1.0f;
|
||||
}
|
||||
sp30 = temp_fa0 * D_800D4A78;
|
||||
@@ -473,25 +475,25 @@ void func_radio_800BB388(void) {
|
||||
sp34 = D_1013570;
|
||||
break;
|
||||
}
|
||||
if (sRadioUseRedBox == 1) {
|
||||
if (sRadioUseRedBox == true) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 25, 25, 170);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170);
|
||||
}
|
||||
TextureRect_8bCI(&gMasterDisp, sp38, sp34, 32, 32, D_radio_80178730, D_radio_80178734 + 16.0f + sp30,
|
||||
D_radio_80178738, D_ctx_80177D50);
|
||||
TextureRect_8bCI(&gMasterDisp, sp38, sp34, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30,
|
||||
gRadioTextBoxScaleX, gRadioTextBoxScaleY);
|
||||
}
|
||||
if (D_ctx_80177D50 == 1.3f) {
|
||||
if (gRadioTextBoxScaleY == 1.3f) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x55);
|
||||
D_ctx_801782F8 =
|
||||
Message_DisplayText(&gMasterDisp, D_ctx_80178308, D_radio_80178728, D_radio_8017872C, D_ctx_801782D8);
|
||||
gMsgCharIsPrinting =
|
||||
Message_DisplayText(&gMasterDisp, gRadioMsg, gRadioPrintPosX, gRadioPrintPosY, gRadioMsgCharIndex);
|
||||
}
|
||||
}
|
||||
|
||||
s32 D_radio_80178748;
|
||||
s32 D_radio_8017874C;
|
||||
s32 D_radio_80178748; // set to 1, never used
|
||||
s32 sRadioCheckMouthFlag;
|
||||
|
||||
void func_radio_800BB5D0(void) {
|
||||
void Radio_Draw(void) {
|
||||
s32 var_v1;
|
||||
s32 temp_ft0;
|
||||
u32 temp_v0;
|
||||
@@ -501,98 +503,98 @@ void func_radio_800BB5D0(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (D_Timer_801782AC > 0) {
|
||||
D_Timer_801782AC--;
|
||||
if (gRadioStateTimer > 0) {
|
||||
gRadioStateTimer--;
|
||||
}
|
||||
|
||||
if (D_Timer_801782B4 > 0) {
|
||||
D_Timer_801782B4--;
|
||||
if (gRadioMouthTimer > 0) {
|
||||
gRadioMouthTimer--;
|
||||
}
|
||||
|
||||
switch (gRadioState) {
|
||||
case 100:
|
||||
D_radio_80178748 = 1;
|
||||
D_ctx_801782A4 = RCID_1000;
|
||||
gCurrentRadioPortrait = RCID_1000;
|
||||
gRadioState = 1;
|
||||
D_ctx_801782D8 = 0;
|
||||
D_ctx_80177D38 = 0.0f;
|
||||
D_ctx_80177D50 = 0.0f;
|
||||
D_radio_8017874C = 0;
|
||||
gRadioMsgCharIndex = 0;
|
||||
gRadioPortraitScaleY = 0.0f;
|
||||
gRadioTextBoxScaleY = 0.0f;
|
||||
sRadioCheckMouthFlag = 0;
|
||||
if (gCamCount != 1) {
|
||||
gRadioState = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
D_ctx_80177D38 += 0.25f;
|
||||
if (D_ctx_80177D38 == 1.0f) {
|
||||
gRadioPortraitScaleY += 0.25f;
|
||||
if (gRadioPortraitScaleY == 1.0f) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 10;
|
||||
gRadioStateTimer = 10;
|
||||
}
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 10;
|
||||
gRadioStateTimer = 10;
|
||||
}
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
temp_v0 = Message_GetWidth(D_ctx_80178308);
|
||||
temp_v0 = Message_GetWidth(gRadioMsg);
|
||||
if (gVIsPerFrame == 3) {
|
||||
D_Timer_801782AC = temp_v0 + 16;
|
||||
gRadioStateTimer = temp_v0 + 16;
|
||||
} else {
|
||||
D_Timer_801782AC = (2 * temp_v0) + 16;
|
||||
gRadioStateTimer = (2 * temp_v0) + 16;
|
||||
}
|
||||
if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_ENDING)) {
|
||||
D_Timer_801782AC = temp_v0 * 2;
|
||||
gRadioStateTimer = temp_v0 * 2;
|
||||
}
|
||||
}
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
D_ctx_80177D50 += 0.26f;
|
||||
if (D_ctx_80177D50 > 1.3f) {
|
||||
D_ctx_80177D50 = 1.3f;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
gRadioTextBoxScaleY += 0.26f;
|
||||
if (gRadioTextBoxScaleY > 1.3f) {
|
||||
gRadioTextBoxScaleY = 1.3f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 31:
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 80 - D_Timer_801782AC;
|
||||
gRadioStateTimer = 80 - gRadioStateTimer;
|
||||
break;
|
||||
|
||||
case 32:
|
||||
if (Audio_GetCurrentVoice() == 0) {
|
||||
D_radio_80178724++;
|
||||
D_ctx_80178308 = D_radio_80178720[D_radio_80178724];
|
||||
Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308));
|
||||
D_ctx_801782D8 = 0;
|
||||
D_radio_8017874C = 0;
|
||||
D_Timer_801782AC = 80;
|
||||
D_Timer_801782AC = Message_GetWidth(D_ctx_80178308) * 2;
|
||||
gRadioMsgListIndex++;
|
||||
gRadioMsg = gRadioMsgList[gRadioMsgListIndex];
|
||||
Audio_PlayVoice(Message_IdFromPtr(gRadioMsg));
|
||||
gRadioMsgCharIndex = 0;
|
||||
sRadioCheckMouthFlag = 0;
|
||||
gRadioStateTimer = 80;
|
||||
gRadioStateTimer = Message_GetWidth(gRadioMsg) * 2;
|
||||
gRadioState = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((Audio_GetCurrentVoice() == 0) && (D_Timer_801782AC == 0)) {
|
||||
D_Timer_801782AC = 10;
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
if ((Audio_GetCurrentVoice() == 0) && (gRadioStateTimer == 0)) {
|
||||
gRadioStateTimer = 10;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
gRadioState = 6;
|
||||
}
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
if (D_Timer_801782B4 > 0) {
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68 + 1;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
if (gRadioMouthTimer > 0) {
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId + 1;
|
||||
}
|
||||
|
||||
if (!gVIsPerFrame) {}
|
||||
@@ -604,42 +606,42 @@ void func_radio_800BB5D0(void) {
|
||||
if (!(fakeTemp)) {
|
||||
temp_v0 = Audio_GetCurrentVoiceStatus();
|
||||
|
||||
if (D_ctx_801782D8 < 60) {
|
||||
if (D_ctx_80178308[D_ctx_801782D8 + 1] == MSGCHAR_NXT) {
|
||||
if (gRadioMsgCharIndex < 60) {
|
||||
if (gRadioMsg[gRadioMsgCharIndex + 1] == MSGCHAR_NXT) {
|
||||
if (temp_v0 == 0) {
|
||||
gRadioState = 31;
|
||||
}
|
||||
} else {
|
||||
D_ctx_801782D8++;
|
||||
gRadioMsgCharIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
if (D_radio_8017874C != 0) {
|
||||
if ((D_ctx_801782E8 >= 23000) && (D_ctx_801782E8 < 23033)) {
|
||||
if (D_ctx_801782F8) {
|
||||
D_Timer_801782B4 = 2;
|
||||
if (sRadioCheckMouthFlag) {
|
||||
if ((gRadioMsgId >= 23000) && (gRadioMsgId < 23033)) {
|
||||
if (gMsgCharIsPrinting) {
|
||||
gRadioMouthTimer = 2;
|
||||
AUDIO_PLAY_SFX(0x49000017, gDefaultSfxSource, 4);
|
||||
}
|
||||
} else if (temp_v0 == 1) {
|
||||
D_Timer_801782B4 = 2;
|
||||
gRadioMouthTimer = 2;
|
||||
} else {
|
||||
D_Timer_801782B4 = 0;
|
||||
gRadioMouthTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
D_radio_8017874C ^= 1;
|
||||
sRadioCheckMouthFlag ^= 1;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 10;
|
||||
gRadioStateTimer = 10;
|
||||
}
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
if (gGameState == GSTATE_ENDING) {
|
||||
Audio_ClearVoice();
|
||||
} else {
|
||||
@@ -647,44 +649,44 @@ void func_radio_800BB5D0(void) {
|
||||
}
|
||||
gRadioState++;
|
||||
}
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
D_ctx_80177D50 -= 0.26f;
|
||||
if (D_ctx_80177D50 < 0.0f) {
|
||||
D_ctx_80177D50 = 0.0f;
|
||||
gRadioTextBoxScaleY -= 0.26f;
|
||||
if (gRadioTextBoxScaleY < 0.0f) {
|
||||
gRadioTextBoxScaleY = 0.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
D_ctx_80177D38 -= 0.25f;
|
||||
if (D_ctx_80177D38 == 0) {
|
||||
D_ctx_80178300 = 0;
|
||||
gCurrentMsgPri = 0;
|
||||
gRadioPortraitScaleY -= 0.25f;
|
||||
if (gRadioPortraitScaleY == 0) {
|
||||
gHideRadio = 0;
|
||||
gRadioMsgPri = 0;
|
||||
gRadioState = 0;
|
||||
}
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
D_ctx_80177D50 = 1.3f;
|
||||
D_ctx_80177D38 = 1.0f;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
gRadioTextBoxScaleY = 1.3f;
|
||||
gRadioPortraitScaleY = 1.0f;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
|
||||
if (((gRadioState > 0) && (gRadioState != 100)) && (D_ctx_80178300 == 0)) {
|
||||
if (((gRadioState > 0) && (gRadioState != 100)) && (gHideRadio == 0)) {
|
||||
func_radio_800BAAE8();
|
||||
func_radio_800BB388();
|
||||
|
||||
temp_ft0 = (s32) D_ctx_80177D68;
|
||||
temp_ft0 = (s32) gRadioMsgRadioId;
|
||||
|
||||
if (((temp_ft0 == RCID_FALCO) || (temp_ft0 == RCID_SLIPPY)) || (temp_ft0 == RCID_PEPPY)) {
|
||||
if (temp_ft0 == RCID_FALCO) {
|
||||
@@ -697,20 +699,20 @@ void func_radio_800BB5D0(void) {
|
||||
var_v1 = TEAM_ID_PEPPY;
|
||||
}
|
||||
if ((gTeamShields[var_v1] <= 0) && (gGameFrameCount & 4) && (gTeamShields[var_v1] != -2) &&
|
||||
(D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP) &&
|
||||
(D_ctx_801782A4 != RCID_1000)) {
|
||||
(gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP) &&
|
||||
(gCurrentRadioPortrait != RCID_1000)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x4C);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
||||
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
|
||||
func_hud_80084B94(1);
|
||||
}
|
||||
if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) &&
|
||||
(D_ctx_801782A4 != RCID_1000)) {
|
||||
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) &&
|
||||
(gCurrentRadioPortrait != RCID_1000)) {
|
||||
func_hud_80086110(22.0f, 165.0f, gTeamShields[var_v1]);
|
||||
}
|
||||
}
|
||||
|
||||
temp_ft0 = (s32) D_ctx_80177D68;
|
||||
temp_ft0 = (s32) gRadioMsgRadioId;
|
||||
|
||||
if ((temp_ft0 == RCID_WOLF) || (temp_ft0 == RCID_PIGMA) || (temp_ft0 == RCID_LEON) ||
|
||||
(temp_ft0 == RCID_ANDREW) || (temp_ft0 == RCID_WOLF_2) || (temp_ft0 == RCID_PIGMA_2) ||
|
||||
@@ -746,131 +748,131 @@ void func_radio_800BB5D0(void) {
|
||||
}
|
||||
|
||||
if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) &&
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_801782A4 != RCID_STATIC) &&
|
||||
(D_ctx_801782A4 != RCID_STATIC_FLIP) && (D_ctx_801782A4 != RCID_1000)) {
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gCurrentRadioPortrait != RCID_STATIC) &&
|
||||
(gCurrentRadioPortrait != RCID_STATIC_FLIP) && (gCurrentRadioPortrait != RCID_1000)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x4C);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
||||
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
|
||||
}
|
||||
if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) &&
|
||||
(D_ctx_801782A4 != RCID_1000)) {
|
||||
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) &&
|
||||
(gCurrentRadioPortrait != RCID_1000)) {
|
||||
func_hud_80086110(22.0f, 165.0f, gActors[var_v1].health * 2.55f);
|
||||
}
|
||||
}
|
||||
if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) &&
|
||||
(D_ctx_801782A4 != RCID_1000)) {
|
||||
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) &&
|
||||
(gCurrentRadioPortrait != RCID_1000)) {
|
||||
func_hud_8008AD94();
|
||||
}
|
||||
}
|
||||
|
||||
if (D_ctx_80178300 == 1) {
|
||||
if (gHideRadio == 1) {
|
||||
func_radio_800BA760();
|
||||
}
|
||||
}
|
||||
|
||||
void func_radio_800BC040(void) {
|
||||
if (gPlayState != PLAY_PAUSE) {
|
||||
if (D_Timer_801782AC > 0) {
|
||||
D_Timer_801782AC--;
|
||||
if (gRadioStateTimer > 0) {
|
||||
gRadioStateTimer--;
|
||||
}
|
||||
if (D_Timer_801782B4 > 0) {
|
||||
D_Timer_801782B4--;
|
||||
if (gRadioMouthTimer > 0) {
|
||||
gRadioMouthTimer--;
|
||||
}
|
||||
|
||||
switch (gRadioState) {
|
||||
case 100:
|
||||
D_ctx_801782A4 = RCID_1000;
|
||||
gCurrentRadioPortrait = RCID_1000;
|
||||
gRadioState = 1;
|
||||
D_ctx_80177D38 = 0.0f;
|
||||
D_ctx_80177D50 = 0.0f;
|
||||
D_ctx_801782D8 = Message_GetWidth(D_ctx_80178308);
|
||||
gRadioPortraitScaleY = 0.0f;
|
||||
gRadioTextBoxScaleY = 0.0f;
|
||||
gRadioMsgCharIndex = Message_GetWidth(gRadioMsg);
|
||||
if (gCamCount != 1) {
|
||||
gRadioState = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
D_ctx_80177D38 += 0.02f;
|
||||
if (D_ctx_80177D38 == 0.04f) {
|
||||
gRadioPortraitScaleY += 0.02f;
|
||||
if (gRadioPortraitScaleY == 0.04f) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 5;
|
||||
gRadioStateTimer = 5;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 5;
|
||||
gRadioStateTimer = 5;
|
||||
}
|
||||
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 5;
|
||||
gRadioStateTimer = 5;
|
||||
|
||||
if (gGameState == GSTATE_TITLE) {
|
||||
D_Timer_801782AC = 30;
|
||||
gRadioStateTimer = 30;
|
||||
}
|
||||
}
|
||||
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
D_ctx_80177D50 += 0.015f;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
gRadioTextBoxScaleY += 0.015f;
|
||||
|
||||
if (D_ctx_80177D50 > 0.07f) {
|
||||
D_ctx_80177D50 = 0.07f;
|
||||
if (gRadioTextBoxScaleY > 0.07f) {
|
||||
gRadioTextBoxScaleY = 0.07f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 10;
|
||||
gRadioStateTimer = 10;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
gRadioState++;
|
||||
D_Timer_801782AC = 5;
|
||||
gRadioStateTimer = 5;
|
||||
}
|
||||
D_ctx_801782A4 = (s32) D_ctx_80177D68;
|
||||
gCurrentRadioPortrait = (s32) gRadioMsgRadioId;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (D_Timer_801782AC == 0) {
|
||||
if (gRadioStateTimer == 0) {
|
||||
Audio_PlayVoice(0);
|
||||
gRadioState++;
|
||||
}
|
||||
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
|
||||
D_ctx_80177D50 -= 0.015f;
|
||||
gRadioTextBoxScaleY -= 0.015f;
|
||||
|
||||
if (D_ctx_80177D50 < 0.0f) {
|
||||
D_ctx_80177D50 = 0.0f;
|
||||
if (gRadioTextBoxScaleY < 0.0f) {
|
||||
gRadioTextBoxScaleY = 0.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
D_ctx_80177D38 -= 0.02f;
|
||||
if (D_ctx_80177D38 == 0) {
|
||||
gRadioPortraitScaleY -= 0.02f;
|
||||
if (gRadioPortraitScaleY == 0) {
|
||||
gRadioState = 0;
|
||||
D_Timer_801782AC = 5;
|
||||
gRadioStateTimer = 5;
|
||||
}
|
||||
D_ctx_801782A4 = RCID_STATIC;
|
||||
gCurrentRadioPortrait = RCID_STATIC;
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
D_ctx_801782A4 = RCID_STATIC_FLIP;
|
||||
gCurrentRadioPortrait = RCID_STATIC_FLIP;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -881,8 +883,8 @@ void func_radio_800BC040(void) {
|
||||
if ((gRadioState > 0) && (gRadioState != 100)) {
|
||||
func_radio_800BAAE8();
|
||||
func_radio_800BB388();
|
||||
if (((s32) D_ctx_80177D68 == RCID_FALCO) || ((s32) D_ctx_80177D68 == RCID_SLIPPY) ||
|
||||
((s32) D_ctx_80177D68 == RCID_PEPPY)) {
|
||||
if (((s32) gRadioMsgRadioId == RCID_FALCO) || ((s32) gRadioMsgRadioId == RCID_SLIPPY) ||
|
||||
((s32) gRadioMsgRadioId == RCID_PEPPY)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
RCP_SetupDL_36();
|
||||
Matrix_Translate(gGfxMatrix, -150.0f, -115.0f, -443.0f, MTXF_APPLY);
|
||||
|
||||
+26
-26
@@ -201,7 +201,7 @@ void func_tank_80043B18(Player* player) {
|
||||
Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z,
|
||||
player->unk_0E8 + sp38, 1.0f);
|
||||
}
|
||||
if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) {
|
||||
if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) {
|
||||
func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f,
|
||||
player->unk_138 + sp3C.z, 2.0f, 255, 15, 0);
|
||||
}
|
||||
@@ -219,7 +219,7 @@ void func_tank_80043B18(Player* player) {
|
||||
Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z,
|
||||
player->unk_0E8 + sp38, 1.0f);
|
||||
}
|
||||
if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) {
|
||||
if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) {
|
||||
func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f,
|
||||
player->unk_138 + sp3C.z, 2.0f, 255, 15, 0);
|
||||
}
|
||||
@@ -308,7 +308,7 @@ void func_tank_800444BC(Player* player) {
|
||||
}
|
||||
sp40 = sp3C = 0.0f;
|
||||
sp38 = gGroundHeight;
|
||||
if (D_ctx_801784AC == 4) {
|
||||
if (gGroundType == 4) {
|
||||
Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &sp40, &sp38, &sp3C);
|
||||
}
|
||||
if (gCurrentLevel == LEVEL_MACBETH) {
|
||||
@@ -335,11 +335,11 @@ void func_tank_800444BC(Player* player) {
|
||||
}
|
||||
|
||||
player->pos.y = sp38 - 3.0f;
|
||||
sp34 = (player->unk_0D0 * 0.2f) + 0.2f;
|
||||
sp34 = (player->baseSpeed * 0.2f) + 0.2f;
|
||||
player->vel.y = -3.0f;
|
||||
|
||||
if ((player->unk_104 > 0.0f) && (sp40 <= 0.0f)) {
|
||||
player->vel.y = player->unk_104 * 0.5f * player->unk_0D0 * 0.035f;
|
||||
player->vel.y = player->unk_104 * 0.5f * player->baseSpeed * 0.035f;
|
||||
player->unk_0E4 = player->unk_104;
|
||||
}
|
||||
if (player->unk_0D4 < 0.0f) {
|
||||
@@ -408,16 +408,16 @@ void func_tank_80044868(Player* player) {
|
||||
Math_SmoothStepToF(&player->unk_0E8, -var_fv1 * D_ctx_80177970, 0.1f, D_ctx_80177968, 0.1f);
|
||||
}
|
||||
player->unk_108 = player->unk_0E8;
|
||||
sp2C = player->unk_0D0;
|
||||
sp2C = player->baseSpeed;
|
||||
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (sp2C < 3.0f)) {
|
||||
sp2C = 3.0f;
|
||||
}
|
||||
if (player->unk_16C > 0.2f) {
|
||||
Math_SmoothStepToF(&player->unk_184, player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_184, player->baseSpeed * 0.5f, 1.0f, 1.0f, 0.0f);
|
||||
}
|
||||
if (player->unk_170 > 0.2f) {
|
||||
Math_SmoothStepToF(&player->unk_184, -player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0.0f);
|
||||
}
|
||||
if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && (player->unk_1D4 != 0)) {
|
||||
Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f);
|
||||
@@ -440,9 +440,9 @@ void func_tank_80044868(Player* player) {
|
||||
} else {
|
||||
Math_SmoothStepToF(&player->vel.x, player->unk_184 - (SIN_DEG(player->unk_108) * sp2C), 0.5f, 5.0f, 0.0f);
|
||||
}
|
||||
player->vel.z += fabsf((player->unk_184 * 0.4f * player->unk_0D0) / 15.0f);
|
||||
player->vel.z += fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f);
|
||||
if (player->unk_000 == 0) {
|
||||
player->vel.z += SIN_DEG(player->unk_0E4) * player->unk_110;
|
||||
player->vel.z += SIN_DEG(player->unk_0E4) * player->boostSpeed;
|
||||
}
|
||||
if (D_800C9F00 != 0) {
|
||||
player->vel.z = 2.0f * D_800C9F00;
|
||||
@@ -474,10 +474,10 @@ void func_tank_80044868(Player* player) {
|
||||
player->pos.z += player->vel.z;
|
||||
if (player->unk_1D4 != 0) {
|
||||
player->unk_0A0 = 0.0f;
|
||||
player->unk_0F4 += player->unk_0D0 * 5.0f;
|
||||
player->unk_0F4 += player->baseSpeed * 5.0f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f;
|
||||
if (D_800C9F04 == 0) {
|
||||
if (player->unk_0D0 != 0.0f) {
|
||||
if (player->baseSpeed != 0.0f) {
|
||||
func_tank_80043B18(player);
|
||||
}
|
||||
if (player->unk_1DC != 0.0f) {
|
||||
@@ -485,7 +485,7 @@ void func_tank_80044868(Player* player) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player->unk_0D0 > 0.0f) {
|
||||
if (player->baseSpeed > 0.0f) {
|
||||
Texture_Scroll(D_landmaster_3002E80, 32, 32, 0);
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
|
||||
func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f);
|
||||
@@ -494,7 +494,7 @@ void func_tank_80044868(Player* player) {
|
||||
func_tank_80043280(D_landmaster_3005EA8, *D_Tex_800DACB8, gGameFrameCount * -55.0f);
|
||||
}
|
||||
}
|
||||
if (player->unk_0D0 > 10.0f) {
|
||||
if (player->baseSpeed > 10.0f) {
|
||||
Texture_Scroll(D_landmaster_3002E80, 32, 32, 0);
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
|
||||
func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f);
|
||||
@@ -579,10 +579,10 @@ void func_tank_80045348(Player* player) {
|
||||
} else {
|
||||
D_800C9F28 = 0.0f;
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_0D0, sp44, sp3C, sp38, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, sp44, sp3C, sp38, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_08C, sp40, sp3C, sp38, 0.001f);
|
||||
} else if (player->unk_19C == -1) {
|
||||
Math_SmoothStepToF(&player->unk_0D0, player->unk_000, 0.1f, 2.0f, 0.01f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, player->unk_000, 0.1f, 2.0f, 0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ void func_tank_80045678(Player* player) {
|
||||
}
|
||||
player->unk_2C0 = 0.0f;
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 1.0f, 0);
|
||||
Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.0f, 0);
|
||||
if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->timer_220 == 0)) {
|
||||
if (D_800C9F3C == 0) {
|
||||
D_800C9F3C = 1;
|
||||
@@ -663,7 +663,7 @@ void func_tank_80045678(Player* player) {
|
||||
player->unk_12C += ((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->unk_12C) * 0.1f;
|
||||
temp = -gInputPress->stick_y;
|
||||
Math_SmoothStepToF(&player->unk_0E4, temp * 0.3f, 0.05f, 5.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->unk_110, 15.0f, 0.5f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->boostSpeed, 15.0f, 0.5f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.00001f);
|
||||
player->unk_0D4 = -0.4f;
|
||||
player->unk_0A0 += player->vel.y;
|
||||
@@ -921,7 +921,7 @@ void func_tank_80046704(Player* player) {
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f);
|
||||
if (temp_v0 == 1) {
|
||||
player->vel.x = -10.0f;
|
||||
@@ -938,7 +938,7 @@ void func_tank_80046704(Player* player) {
|
||||
(scenery->obj.id == OBJ_SCENERY_68)) {
|
||||
Player_ApplyDamage(player, temp_v0, 5);
|
||||
}
|
||||
player->unk_0D0 = -(D_800C9F00 * 1.5f);
|
||||
player->baseSpeed = -(D_800C9F00 * 1.5f);
|
||||
player->vel.z = D_800C9F00 * 1.5f;
|
||||
D_800C9F00 = 12;
|
||||
AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0);
|
||||
@@ -1360,10 +1360,10 @@ void func_tank_800481F4(Player* player) {
|
||||
if (temp_v0 != 0) {
|
||||
if (temp_v0 < 0) {
|
||||
if (temp_v0 == -1) {
|
||||
D_ctx_80178540 = 40;
|
||||
D_ctx_80178570 = 20;
|
||||
D_ctx_80178574 = 20;
|
||||
D_ctx_80178578 = 20;
|
||||
gLight2colorStep = 40;
|
||||
gLight2RTarget = 20;
|
||||
gLight2GTarget = 20;
|
||||
gLight2BTarget = 20;
|
||||
player->shadowing = 80;
|
||||
if (player->whooshTimer == 0) {
|
||||
AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0);
|
||||
@@ -1420,7 +1420,7 @@ void func_tank_800481F4(Player* player) {
|
||||
player->timer_1E8 = 15;
|
||||
player->unk_1EC = player->unk_1F0 = -20;
|
||||
}
|
||||
Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f);
|
||||
player->vel.x = 0.0f;
|
||||
player->vel.y = 30.0f;
|
||||
@@ -1434,7 +1434,7 @@ void func_tank_800481F4(Player* player) {
|
||||
actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z,
|
||||
actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f,
|
||||
0.0f) != 0) {
|
||||
Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f);
|
||||
Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f);
|
||||
Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f);
|
||||
if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) {
|
||||
player->unk_0D8.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f;
|
||||
|
||||
+81
-81
@@ -6,7 +6,7 @@
|
||||
#include "assets/ast_versus.h"
|
||||
|
||||
s32 D_versus_80178750;
|
||||
s32 D_versus_80178754;
|
||||
s32 gVsMatchState;
|
||||
s32 D_versus_80178758;
|
||||
s32 sUnlockLandmaster;
|
||||
s32 sUnlockOnFoot;
|
||||
@@ -19,7 +19,7 @@ s32 D_80178798;
|
||||
s32 D_8017879C;
|
||||
s32 D_801787A0;
|
||||
s32 D_801787A4;
|
||||
s32 D_801787A8;
|
||||
s32 gVsWinner;
|
||||
f32 D_801787AC;
|
||||
f32 D_801787B0;
|
||||
s32 D_801787B4;
|
||||
@@ -45,8 +45,8 @@ OSTime D_80178868;
|
||||
s32 D_800D4A90 = 0;
|
||||
s32 D_800D4A94 = 0;
|
||||
s32 D_800D4A98 = 0;
|
||||
s32 D_800D4A9C = 0;
|
||||
s32 D_800D4AA0 = 0;
|
||||
s32 sStartVsHurryBgm = 0;
|
||||
s32 sVsHurryBgmPlaying = 0;
|
||||
|
||||
void func_versus_800BC760(void) {
|
||||
s32 i;
|
||||
@@ -64,9 +64,9 @@ void func_versus_800BC760(void) {
|
||||
gCamCount = 1;
|
||||
gPlayState = PLAY_STANDBY;
|
||||
gDrawMode = DRAW_NONE;
|
||||
D_ctx_80177AE0 = 0;
|
||||
gTitleState = 0;
|
||||
gOptionMenuStatus = OPTION_WAIT;
|
||||
D_ctx_80177B40 = 0;
|
||||
gMapState = 0;
|
||||
gBgColor = 0;
|
||||
gPlayerGlareAlphas[0] = 0;
|
||||
gPlayerGlareAlphas[1] = 0;
|
||||
@@ -649,8 +649,8 @@ s32 func_versus_800BF17C(void) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((gPlayerInactive[i]) || (D_ctx_801778AC == 1) || ((D_801787B4 == 1) && (D_ctx_801778AC != 2)) ||
|
||||
((D_ctx_801778AC == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) &&
|
||||
if ((gPlayerInactive[i]) || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) ||
|
||||
((gVsMatchType == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) &&
|
||||
(D_versus_80178768[2] == 0))) {
|
||||
ret = Math_SmoothStepToF(&D_801787D8[i], D_801787E8[i], 0.3f, 100.0f, 1.0f);
|
||||
if (ret == 0.0f) {
|
||||
@@ -717,7 +717,7 @@ s32 func_versus_800BF17C(void) {
|
||||
|
||||
D_80178820[i]++;
|
||||
|
||||
if (D_ctx_801778AC == 2) {
|
||||
if (gVsMatchType == 2) {
|
||||
D_ctx_80177C30[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0;
|
||||
}
|
||||
gPlayer[i].unk_1D0 = 1;
|
||||
@@ -741,7 +741,7 @@ s32 func_versus_800BF59C(void) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((gPlayerInactive[i]) || (D_ctx_801778AC == 1)) {
|
||||
if ((gPlayerInactive[i]) || (gVsMatchType == 1)) {
|
||||
colorGB = D_801787D8[i];
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255);
|
||||
func_versus_800BD76C(D_800D4BFC[i], D_800D4C0C[i]);
|
||||
@@ -780,18 +780,18 @@ void func_versus_800BF750(void) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_versus_800BF9AC(void) {
|
||||
s32 Versus_CheckForWinner(void) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 temp;
|
||||
s32 var_a3;
|
||||
s32 temp2[4];
|
||||
|
||||
switch (D_ctx_801778AC) {
|
||||
switch (gVsMatchType) {
|
||||
case 0:
|
||||
for (i = 0, var_a3 = 0; i < 4; i++) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
D_801787A8 = i;
|
||||
gVsWinner = i;
|
||||
}
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
var_a3 += 1;
|
||||
@@ -800,16 +800,16 @@ s32 func_versus_800BF9AC(void) {
|
||||
|
||||
if ((D_801787B4 == 1) && (var_a3 == 4)) {
|
||||
D_ctx_80177E74 = 1;
|
||||
D_801787A8 = 99;
|
||||
gVsWinner = 99;
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (D_ctx_80177DB8[i] == D_ctx_801778A4) {
|
||||
if (D_ctx_80177DB8[i] == gVsPointsToWin) {
|
||||
break;
|
||||
}
|
||||
if (D_ctx_80177DB8[i] == (D_ctx_801778A4 - 1)) {
|
||||
D_800D4A9C = 1;
|
||||
if (D_ctx_80177DB8[i] == (gVsPointsToWin - 1)) {
|
||||
sStartVsHurryBgm = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,14 +831,14 @@ s32 func_versus_800BF9AC(void) {
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
|
||||
}
|
||||
D_ctx_80177E74 = 1;
|
||||
D_801787A8 = i;
|
||||
gVsWinner = i;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
for (i = 0, var_a3 = 0; i < 4; i++) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
D_801787A8 = i;
|
||||
gVsWinner = i;
|
||||
}
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
var_a3 += 1;
|
||||
@@ -846,12 +846,12 @@ s32 func_versus_800BF9AC(void) {
|
||||
}
|
||||
if ((D_801787B4 == 1) && (var_a3 == 4)) {
|
||||
D_ctx_80177E74 = 1;
|
||||
D_801787A8 = 99;
|
||||
gVsWinner = 99;
|
||||
break;
|
||||
}
|
||||
|
||||
if (var_a3 >= 2) {
|
||||
D_800D4A9C = 1;
|
||||
sStartVsHurryBgm = 1;
|
||||
}
|
||||
|
||||
if ((var_a3 < 3) || (D_801787B4 == 1)) {
|
||||
@@ -859,11 +859,11 @@ s32 func_versus_800BF9AC(void) {
|
||||
}
|
||||
|
||||
if (var_a3 >= 4) {
|
||||
D_801787A8 = 99;
|
||||
gVsWinner = 99;
|
||||
}
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (j == D_801787A8) {
|
||||
if (j == gVsWinner) {
|
||||
continue;
|
||||
}
|
||||
if (gPlayer[j].unk_288 >= 0) {
|
||||
@@ -879,7 +879,7 @@ s32 func_versus_800BF9AC(void) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (D_ctx_801778AC == 2) {
|
||||
if (gVsMatchType == 2) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) ||
|
||||
(gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) {
|
||||
@@ -917,11 +917,11 @@ s32 func_versus_800BF9AC(void) {
|
||||
}
|
||||
|
||||
if ((j == 4) && (temp == 0)) {
|
||||
D_801787A8 = i;
|
||||
gVsWinner = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (D_801787A8 == 99) {
|
||||
if (gVsWinner == 99) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (!gControllerPlugged[i]) {
|
||||
continue;
|
||||
@@ -949,11 +949,11 @@ s32 func_versus_800BF9AC(void) {
|
||||
}
|
||||
}
|
||||
if ((j == 4) && (temp == 0)) {
|
||||
D_801787A8 = i;
|
||||
gVsWinner = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (D_801787A8 == 99) {
|
||||
if (gVsWinner == 99) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (!gControllerPlugged[i]) {
|
||||
continue;
|
||||
@@ -980,14 +980,14 @@ s32 func_versus_800BF9AC(void) {
|
||||
}
|
||||
}
|
||||
if ((j == 4) && (temp == 0)) {
|
||||
D_801787A8 = i;
|
||||
gVsWinner = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (j == D_801787A8) {
|
||||
if (j == gVsWinner) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
|
||||
if ((D_ctx_801778AC == 2) && (D_800D4A98 & 0x20) && (D_801787A8 != 99)) {
|
||||
if ((gVsMatchType == 2) && (D_800D4A98 & 0x20) && (gVsWinner != 99)) {
|
||||
x = 118.0f;
|
||||
y = 110.0f;
|
||||
|
||||
@@ -1308,7 +1308,7 @@ s32 func_versus_800C0E78(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool func_versus_800C107C(s32 arg0) {
|
||||
bool func_versus_800C107C(s32 playerNum) {
|
||||
D_80178798++;
|
||||
if (D_80178798 == 10) {
|
||||
AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4);
|
||||
@@ -1316,7 +1316,7 @@ bool func_versus_800C107C(s32 arg0) {
|
||||
D_80178798 = 0;
|
||||
}
|
||||
|
||||
if (D_801787B8 < D_ctx_80177DB8[arg0]) {
|
||||
if (D_801787B8 < D_ctx_80177DB8[playerNum]) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@@ -1366,14 +1366,14 @@ void func_versus_800C1368(void) {
|
||||
D_8017879C = 0;
|
||||
D_801787A0 = 0;
|
||||
D_801787A4 = 0;
|
||||
D_801787A8 = 99;
|
||||
gVsWinner = 99;
|
||||
D_801787B8 = 0;
|
||||
D_versus_80178750 = 0;
|
||||
gBgColor = 0;
|
||||
D_80178830 = 0;
|
||||
D_800D4A90 = 0;
|
||||
D_800D4A98 = 0;
|
||||
D_800D4A9C = D_800D4AA0 = 0;
|
||||
sStartVsHurryBgm = sVsHurryBgmPlaying = 0;
|
||||
gFillScreenAlpha = 255;
|
||||
gFillScreenAlphaStep = 0;
|
||||
gFillScreenAlphaTarget = 0;
|
||||
@@ -1401,14 +1401,14 @@ void func_versus_800C1368(void) {
|
||||
sUnlockOnFoot = false;
|
||||
}
|
||||
|
||||
if (D_ctx_801778AC == 2) {
|
||||
D_ctx_801778A4 = 10000;
|
||||
if (gVsMatchType == 2) {
|
||||
gVsPointsToWin = 10000;
|
||||
}
|
||||
if (!sUnlockLandmaster) {
|
||||
sUnlockOnFoot = false;
|
||||
}
|
||||
|
||||
D_versus_80178768[0] = D_ctx_801778C8 + 1;
|
||||
D_versus_80178768[0] = gVsTimeTrialLimit + 1;
|
||||
D_versus_80178768[1] = 0;
|
||||
D_versus_80178768[2] = 0;
|
||||
}
|
||||
@@ -1444,7 +1444,7 @@ bool func_versus_800C15D8(void) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* return type needs to be s32 for func_versus_800C176C to match */
|
||||
/* return type needs to be s32 for Versus_Update to match */
|
||||
s32 func_versus_800C1690(void) {
|
||||
D_80178798 = 0;
|
||||
}
|
||||
@@ -1460,7 +1460,7 @@ bool func_versus_800C16A0(s32 arg0) {
|
||||
|
||||
void func_versus_800C16D0(void) {
|
||||
func_play_800ABA08();
|
||||
D_versus_80178754 = 0;
|
||||
gVsMatchState = 0;
|
||||
D_80178778 = 0;
|
||||
}
|
||||
|
||||
@@ -1482,13 +1482,13 @@ void func_versus_800C175C(void) {
|
||||
void func_versus_800C1764(void) {
|
||||
}
|
||||
|
||||
bool func_versus_800C176C(void) {
|
||||
bool Versus_Update(void) {
|
||||
s32 ret = 0;
|
||||
|
||||
switch (D_versus_80178754) {
|
||||
switch (gVsMatchState) {
|
||||
case 0:
|
||||
func_versus_800C1368();
|
||||
D_versus_80178754 = 1;
|
||||
gVsMatchState = 1;
|
||||
func_versus_800C1690();
|
||||
break;
|
||||
|
||||
@@ -1498,7 +1498,7 @@ bool func_versus_800C176C(void) {
|
||||
}
|
||||
if (func_versus_800C16A0(30)) {
|
||||
AUDIO_PLAY_BGM(gBgmSeqId);
|
||||
D_versus_80178754 = 2;
|
||||
gVsMatchState = 2;
|
||||
func_versus_800C1690();
|
||||
}
|
||||
break;
|
||||
@@ -1510,7 +1510,7 @@ bool func_versus_800C176C(void) {
|
||||
}
|
||||
if (func_versus_800C16A0(30)) {
|
||||
func_play_800ABA08();
|
||||
D_versus_80178754 = 3;
|
||||
gVsMatchState = 3;
|
||||
func_versus_800C1690();
|
||||
}
|
||||
break;
|
||||
@@ -1526,17 +1526,17 @@ bool func_versus_800C176C(void) {
|
||||
D_ctx_80177E7C = 1;
|
||||
}
|
||||
if (func_versus_800C16A0(30)) {
|
||||
D_versus_80178754 = 4;
|
||||
gVsMatchState = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((D_800D4A9C == 1) && (D_800D4AA0 == 0)) {
|
||||
if ((sStartVsHurryBgm == 1) && (sVsHurryBgmPlaying == 0)) {
|
||||
AUDIO_PLAY_BGM(SEQ_ID_VS_HURRY | SEQ_FLAG);
|
||||
D_800D4AA0 = 1;
|
||||
sVsHurryBgmPlaying = 1;
|
||||
}
|
||||
|
||||
if (D_ctx_801778AC == 2) {
|
||||
if (gVsMatchType == 2) {
|
||||
D_80178778 = 10;
|
||||
func_versus_800BE078();
|
||||
func_versus_800BDE3C();
|
||||
@@ -1544,15 +1544,15 @@ bool func_versus_800C176C(void) {
|
||||
D_80178778 = 8;
|
||||
}
|
||||
|
||||
if (func_versus_800BF9AC()) {
|
||||
if (Versus_CheckForWinner()) {
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
|
||||
if (D_ctx_801778AC == 2) {
|
||||
if (gVsMatchType == 2) {
|
||||
D_80178778 = 11;
|
||||
} else {
|
||||
D_80178778 = 0;
|
||||
}
|
||||
D_versus_80178754 = 5;
|
||||
gVsMatchState = 5;
|
||||
func_versus_800C1690();
|
||||
} else {
|
||||
func_versus_800BF17C();
|
||||
@@ -1561,7 +1561,7 @@ bool func_versus_800C176C(void) {
|
||||
|
||||
case 5:
|
||||
if (func_versus_800C16A0(60)) {
|
||||
switch (D_801787A8) {
|
||||
switch (gVsWinner) {
|
||||
case 0:
|
||||
|
||||
case 1:
|
||||
@@ -1581,19 +1581,19 @@ bool func_versus_800C176C(void) {
|
||||
}
|
||||
|
||||
D_versus_80178750 = 1;
|
||||
D_versus_80178754 = 6;
|
||||
gVsMatchState = 6;
|
||||
func_versus_800C024C();
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
D_80178778 = 3;
|
||||
if (!func_versus_800C0294(D_801787A8)) {
|
||||
if (!func_versus_800C0294(gVsWinner)) {
|
||||
break;
|
||||
}
|
||||
if (func_versus_800C16A0(30)) {
|
||||
func_versus_800C1690();
|
||||
D_versus_80178754 = 7;
|
||||
gVsMatchState = 7;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1601,26 +1601,26 @@ bool func_versus_800C176C(void) {
|
||||
D_80178778 = 4;
|
||||
if (func_versus_800C16A0(15)) {
|
||||
func_versus_800C1690();
|
||||
if (((D_ctx_801778AC == 0) && (D_801787B4 > 1)) || (D_ctx_801778AC == 2)) {
|
||||
D_versus_80178754 = 8;
|
||||
if (((gVsMatchType == 0) && (D_801787B4 > 1)) || (gVsMatchType == 2)) {
|
||||
gVsMatchState = 8;
|
||||
} else {
|
||||
D_versus_80178754 = 9;
|
||||
gVsMatchState = 9;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
D_80178778 = 5;
|
||||
switch (D_ctx_801778AC) {
|
||||
switch (gVsMatchType) {
|
||||
case 0:
|
||||
if (func_versus_800C107C(D_801787A8)) {
|
||||
D_versus_80178754 = 9;
|
||||
if (func_versus_800C107C(gVsWinner)) {
|
||||
gVsMatchState = 9;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (func_versus_800C0D10()) {
|
||||
D_versus_80178754 = 9;
|
||||
gVsMatchState = 9;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1636,7 +1636,7 @@ bool func_versus_800C176C(void) {
|
||||
func_versus_800C1690();
|
||||
D_801787AC = 0.0f;
|
||||
D_80178830 = 0;
|
||||
D_versus_80178754 = 10;
|
||||
gVsMatchState = 10;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1645,19 +1645,19 @@ bool func_versus_800C176C(void) {
|
||||
if (func_versus_800C16A0(60) && func_versus_800C0C84()) {
|
||||
switch (D_801787A4) {
|
||||
case 0:
|
||||
D_versus_80178754 = 11;
|
||||
gVsMatchState = 11;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
D_versus_80178754 = 12;
|
||||
gVsMatchState = 12;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
D_versus_80178754 = 13;
|
||||
gVsMatchState = 13;
|
||||
break;
|
||||
|
||||
default:
|
||||
D_versus_80178754 = 14;
|
||||
gVsMatchState = 14;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1713,32 +1713,32 @@ bool func_versus_800C176C(void) {
|
||||
case 20:
|
||||
D_80178778 = 9;
|
||||
if (gInputPress->button & B_BUTTON) {
|
||||
D_versus_80178754 = 13;
|
||||
gVsMatchState = 13;
|
||||
} else {
|
||||
func_versus_800C175C();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (((D_versus_80178754 == 8) || (D_versus_80178754 == 9)) || (D_versus_80178754 == 10)) {
|
||||
if (((gVsMatchState == 8) || (gVsMatchState == 9)) || (gVsMatchState == 10)) {
|
||||
D_800D4A98++;
|
||||
}
|
||||
|
||||
if (D_versus_80178754 >= 5) {
|
||||
if (gVsMatchState >= 5) {
|
||||
gPauseEnabled = 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_versus_800C1E9C(void) {
|
||||
s32 Versus_Main(void) {
|
||||
if (gPlayState != PLAY_PAUSE) {
|
||||
func_versus_800C176C();
|
||||
Versus_Update();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_versus_800C1ED4(void) {
|
||||
void Versus_Draw(void) {
|
||||
s32 var_a1;
|
||||
|
||||
D_80178868 = D_80178860;
|
||||
@@ -1758,9 +1758,9 @@ void func_versus_800C1ED4(void) {
|
||||
func_versus_800C0970(D_801787CC, D_801787D0);
|
||||
|
||||
case 5:
|
||||
switch (D_ctx_801778AC) {
|
||||
switch (gVsMatchType) {
|
||||
case 0:
|
||||
func_versus_800C1138(D_801787B8, D_801787A8);
|
||||
func_versus_800C1138(D_801787B8, gVsWinner);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -1768,14 +1768,14 @@ void func_versus_800C1ED4(void) {
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
if ((D_ctx_801778AC != 2) || (!(D_800D4A98 & 0x20))) {
|
||||
if (D_801787A8 < 4) {
|
||||
if ((gVsMatchType != 2) || (!(D_800D4A98 & 0x20))) {
|
||||
if (gVsWinner < 4) {
|
||||
func_versus_800C075C();
|
||||
}
|
||||
}
|
||||
|
||||
case 3:
|
||||
func_versus_800C04DC(D_801787C0, D_801787C8, D_801787A8);
|
||||
func_versus_800C04DC(D_801787C0, D_801787C8, gVsWinner);
|
||||
if (D_80178778 == 7) {
|
||||
func_versus_800C0B0C();
|
||||
}
|
||||
@@ -1789,7 +1789,7 @@ void func_versus_800C1ED4(void) {
|
||||
func_versus_800BF59C();
|
||||
|
||||
case 11:
|
||||
if (D_ctx_801778AC == 2) {
|
||||
if (gVsMatchType == 2) {
|
||||
func_versus_800BE300(124.0f, 116.0f, D_versus_80178768);
|
||||
}
|
||||
break;
|
||||
@@ -1973,7 +1973,7 @@ void func_versus_800C26C8(void) {
|
||||
Vec3f dest;
|
||||
Actor* actor;
|
||||
|
||||
if ((D_ctx_801778AC != 2) || (D_ctx_80177E7C == 0)) {
|
||||
if ((gVsMatchType != 2) || (D_ctx_80177E7C == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user