Repo upstreamed

This commit is contained in:
KiritoDv
2024-09-17 20:16:46 -03:00
committed by Sonic Dreamcaster
parent 6248c70be1
commit 7c801d33d9
42 changed files with 334 additions and 396 deletions
+2
View File
@@ -152,6 +152,8 @@
"ast_a_ti.h": "c",
"fox_co.h": "c",
"ast_map.h": "c"
"xmemory": "c",
"iosfwd": "c"
},
"C_Cpp_Runner.msvcBatchPath": ""
}
+4
View File
@@ -7,7 +7,11 @@
header:
- '#include "gfx.h"'
- '#include "sf64object.h"'
<<<<<<<< HEAD:assets/yaml/jp/rev0/ast_A_ti.yaml
========
>>>>>>>> 6fe91928 (Repo upstreamed):assets/yaml/us/rev1/ast_A_ti.yaml
D_TI_A000000:
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000}
+1 -1
View File
@@ -180,4 +180,4 @@ aFoMountain3Hitbox:
{ type: SF64:HITBOX, offset: 0x600FFC0, symbol: aFoMountain3Hitbox }
aFoBaseHitbox:
{ type: SF64:HITBOX, offset: 0x600FFE0, symbol: aFoBaseHitbox }
{ type: SF64:HITBOX, offset: 0x600FFE0, symbol: aFoBaseHitbox }
+1 -1
View File
@@ -179,4 +179,4 @@ aVe1MonkeyStatueHitbox:
{ type: SF64:HITBOX, offset: 0x601B8D8, symbol: aVe1MonkeyStatueHitbox }
aVe1EnemyGateHitbox:
{ type: SF64:HITBOX, offset: 0x601B944, symbol: aVe1EnemyGateHitbox }
{ type: SF64:HITBOX, offset: 0x601B944, symbol: aVe1EnemyGateHitbox }
+1 -1
View File
@@ -202,4 +202,4 @@ aVe2BaseHitbox:
{ type: SF64:HITBOX, offset: 0x60166F4, symbol: aVe2BaseHitbox }
aVe2MountainHitbox:
{ type: SF64:HITBOX, offset: 0x6016714, symbol: aVe2MountainHitbox }
{ type: SF64:HITBOX, offset: 0x6016714, symbol: aVe2MountainHitbox }
+11
View File
@@ -10,11 +10,19 @@
header:
- '#include "gfx.h"'
- '#include "sf64object.h"'
<<<<<<< HEAD
external_files:
- "assets/yaml/us/rev1/ast_7_ti_2.yaml"
- "assets/yaml/us/rev1/ast_8_ti.yaml"
- "assets/yaml/us/rev1/ast_9_ti.yaml"
=======
<<<<<<<< HEAD:assets/yaml/jp/rev0/ast_A_ti.yaml
========
>>>>>>>> 6fe91928 (Repo upstreamed):assets/yaml/us/rev1/ast_A_ti.yaml
>>>>>>> 6fe91928 (Repo upstreamed)
D_TI_A000000:
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000}
@@ -65,4 +73,7 @@ D_TI_A002170:
D_TI_A009990:
{type: SF64:ANIM, offset: 0xA009990, symbol: D_TI_A009990}
<<<<<<< HEAD
=======
>>>>>>> 6fe91928 (Repo upstreamed)
+9
View File
@@ -11,6 +11,15 @@
// #define MODS_BOOT_STATE 3 // main menu
// #define MODS_BOOT_STATE 4 // map
/**
* Quick Boot:
* Define this variable to a game state to boot into that
* state. Two presets (map and main menu) are provided.
* For the full list of game states, see sf64thread.h.
*/
// #define MODS_BOOT_STATE 3 // main menu
// #define MODS_BOOT_STATE 4 // map
/**
* Level Select:
* Use the D-Pad to select a level. Press L to start in
+2 -2
View File
@@ -18,8 +18,8 @@ void Audio_SetVolume(u8 audioType, u8 volume);
void Audio_FadeOutAll(u8 fadeoutTime);
void Audio_SetAudioSpec(u8 unused, u16 specParam);
#define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec))
#define AUDIO_SET_SPEC_ALT(sfxLayout, spec) Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec))
#define AUDIO_SET_SPEC(sfxLayout, spec) // Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec))
#define AUDIO_SET_SPEC_ALT(sfxLayout, spec) // Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec))
// used by sys or related
void AudioLoad_Init(void);
+12 -8
View File
@@ -68,17 +68,21 @@
#define SEGMENT_BSS_END(segment) (segment ## _BSS_END)
#define SEGMENT_BSS_SIZE(segment) ((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment))
#define ROM_SEGMENT(file) { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }
#define NO_SEGMENT \
{ NULL, NULL }
#define OVERLAY_OFFSETS(file) \
{ { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, \
{ SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \
{ SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, \
{ SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) } }
#define OVERLAY_OFFSETS(file) \
NO_OVERLAY
#define NO_SEGMENT { NULL, NULL }
#define NO_OVERLAY \
{ \
{ NULL, NULL }, { NULL, NULL }, { NULL, NULL }, { \
NULL, NULL \
} \
}
#define NO_OVERLAY { NO_SEGMENT, NO_SEGMENT, NO_SEGMENT, NO_SEGMENT }
#define ROM_SEGMENT(file) \
NO_SEGMENT
u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup);
void Load_InitDmaAndMsg(void);
+1 -1
View File
@@ -34,7 +34,7 @@ void Audio_PlayPauseSfx(u8 active);
void Audio_PlayMapMenuSfx(u8 active);
void Audio_KillAllSfx(void);
#define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb))
#define AUDIO_PLAY_SFX(sfxId, srcPos, token) //(Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb))
#define SFX_FLAG_18 (1 << 18) // makes distance ignore z position? probably more
#define SFX_FLAG_19 (1 << 19)
+3 -1
View File
@@ -158,7 +158,10 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
u8* dma;
gSampleDmaBuffSize = 0x2D0;
<<<<<<< HEAD
=======
>>>>>>> 6fe91928 (Repo upstreamed)
for (i = 0; i < (3 * gNumNotes * gAudioBufferParams.count); i++) {
dma = AudioHeap_Alloc(&gMiscPool, gSampleDmaBuffSize);
gSampleDmas[gSampleDmaCount].ramAddr = dma;
@@ -966,7 +969,6 @@ void AudioLoad_Init(void) {
static const char devstr38[] = "Entry--- %d %d\n";
static const char devstr39[] = "---Block LPS here\n";
static const char devstr40[] = "===Block LPS end\n";
s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
Sample* sample;
AudioSlowLoad* slowLoad;
-1
View File
@@ -1406,7 +1406,6 @@ void func_800168BC(void) {
gSeqLayers[i].channel = NULL;
gSeqLayers[i].enabled = false;
}
for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) {
for (j = 0; j < 16; j++) {
gSeqPlayers[i].channels[j] = &gSeqChannelNone;
-40
View File
@@ -158,7 +158,6 @@ void AllRange_GreatFoxRepair(Player* player) {
} else {
gCsCamEyeZ = 480.0f;
}
player->rot.y = 0.0f;
player->pos.x = 2100.0f;
player->baseSpeed = 30.0f;
@@ -193,7 +192,6 @@ void AllRange_GreatFoxRepair(Player* player) {
player->pos.y = -420.0f;
player->pos.z = 0.0f;
player->rot.z = 0.0f;
gCsCamEyeX = -683.0f;
gCsCamEyeY = -346.0f;
gCsCamEyeZ = 305.0f;
@@ -396,7 +394,6 @@ void ActorAllRange_SpawnTeam(void) {
actor->obj.pos.y = sTeamSpawnPos[i].y;
actor->obj.pos.z = sTeamSpawnPos[i].z;
actor->aiType = sTeamAi[i];
if (gCurrentLevel == LEVEL_KATINA) {
actor->aiIndex = sTeamSpawnTargetsKA[i];
} else {
@@ -528,7 +525,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y;
gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z;
}
if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) {
gAllRangeFrameCount++;
for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) {
@@ -538,12 +534,10 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
gActors[actor->aiIndex].iwork[2] = AI360_FOX;
gActors[actor->aiIndex].state = STATE360_2;
gActors[actor->aiIndex].aiIndex = actor->aiType;
if (gTeamHelpActor == &gActors[actor->aiIndex]) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
}
if (gActors[actor->aiIndex].iwork[3] == 0) {
switch (gActors[actor->aiIndex].aiType) {
case AI360_FALCO:
@@ -559,7 +553,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
gActors[actor->aiIndex].iwork[3] = 200;
}
}
if (actor->aiType == AI360_WOLF) {
if (gCurrentLevel != LEVEL_VENOM_2) {
actor->state = STATE360_3;
@@ -571,7 +564,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
}
}
}
if (gTeamShields[TEAM_ID_FALCO] <= 0) {
gActors[AI360_LEON].aiIndex = AI360_FOX;
}
@@ -629,7 +621,6 @@ void ActorAllRange_UpdateEnemyEvents(Actor* this) {
return;
}
}
if (gTeamShields[enemy->aiIndex] > 0) {
ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]);
if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) &&
@@ -707,7 +698,6 @@ void ActorAllRange_SpawnSupplies(Actor* this) {
}
}
}
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeSuppliesSent) {
if (gAllRangeWingRepairTimer != 0) {
gAllRangeWingRepairTimer--;
@@ -879,12 +869,10 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
if (this->aiType == AI360_GREAT_FOX) {
this->dmgType = DMG_NONE;
}
if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) {
this->damage = 10;
this->timer_0C2 = 10;
}
if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) &&
(this->dmgType == DMG_EXPLOSION)) {
this->dmgType = DMG_NONE;
@@ -911,7 +899,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
this->dmgSource = 0;
}
}
if (this->aiType >= AI360_WOLF) {
if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) &&
!((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) {
@@ -954,7 +941,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
}
return;
}
this->timer_0C6 = 50;
this->iwork[8] = 20;
this->obj.status = OBJ_DYING;
@@ -1008,7 +994,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
}
gKaAllyKillCount++;
}
switch (this->aiType) {
case AI360_WOLF:
gStarWolfTeamAlive[0] = 0;
@@ -1067,7 +1052,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
}
}
break;
case AI360_FALCO + NPC_SHOT_ID + 1:
case AI360_SLIPPY + NPC_SHOT_ID + 1:
case AI360_PEPPY + NPC_SHOT_ID + 1:
@@ -1230,7 +1214,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
} else {
Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY);
}
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
gTeamHelpActor = this;
gTeamHelpTimer = 320;
@@ -1317,7 +1300,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
ActorAllRange_UpdateEvents(this);
return;
}
if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) {
switch (RAND_INT(3.9f)) {
case 0:
@@ -1358,7 +1340,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
this->work_046 = 0;
break;
case STATE360_9:
this->timer_0BC = RAND_INT(20.0f) + 30;
if (Rand_ZeroOne() < 0.5f) {
@@ -1373,7 +1354,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[19] += 360.0f;
}
break;
case STATE360_10:
this->timer_0BC = 35;
if (Rand_ZeroOne() < 0.5f) {
@@ -1389,7 +1369,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
break;
}
}
this->iwork[16] = STATE360_0;
spCC = spC8 = spC4 = 0.0f;
@@ -1461,7 +1440,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
sp104 = 0;
this->iwork[5] = 0;
if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) &&
(this->state != STATE360_6)) {
this->state = STATE360_6;
@@ -1517,7 +1495,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
sp104 = 2;
break;
case STATE360_5:
SectorZ_Missile_Update(this);
sp104 = 1;
@@ -1551,7 +1528,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.03f, 0.5f, 0.0f);
}
break;
case STATE360_1:
this->fwork[1] = 40.0f;
@@ -1566,7 +1542,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
break;
case STATE360_2:
sp104 = 1;
spF8 = 800.0f;
@@ -1618,14 +1593,12 @@ void ActorAllRange_Update(ActorAllRange* this) {
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f;
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
}
if (!gPlayer[0].somersault) {
this->fwork[4] = gPlayer[0].pos.x + spCC;
this->fwork[5] = gPlayer[0].pos.y + spC8;
this->fwork[6] = gPlayer[0].trueZpos + spC4;
this->fwork[1] = gPlayer[0].baseSpeed + 10.0f;
}
if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) {
this->fwork[3] = 3.0f;
this->fwork[1] = gPlayer[0].baseSpeed - 5.0f;
@@ -1676,7 +1649,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[6] = gBosses[0].obj.pos.z;
this->fwork[1] = 40.0f;
}
if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) {
if (spE8 < spF8) {
if (spEC < spF8) {
@@ -1899,7 +1871,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
} else {
this->iwork[4] = 0;
}
if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) ||
(gActors[this->aiIndex].state == STATE360_6) ||
(gActors[this->aiIndex].obj.status == OBJ_FREE))) {
@@ -1911,7 +1882,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
break;
case STATE360_3:
sp104 = 1;
if (this->timer_0BC == 0) {
@@ -1932,7 +1902,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[3] = 1.0f;
this->fwork[1] = 38.0f;
}
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) {
this->fwork[10] = 30.0f;
}
@@ -1991,7 +1960,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
break;
case STATE360_7:
this->fwork[1] = 40.0f;
Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f);
@@ -2000,7 +1968,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->state = STATE360_3;
}
break;
case STATE360_8:
this->fwork[1] = 40.0f;
if ((this->index % 2) != 0) {
@@ -2034,7 +2001,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
break;
}
break;
case STATE360_9:
this->fwork[1] = 40.0f;
if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) {
@@ -2047,7 +2013,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->state = STATE360_3;
}
break;
case STATE360_10:
sp104 = 1;
if (this->timer_0BC == 0) {
@@ -2069,7 +2034,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
if (gCurrentLevel == LEVEL_VENOM_2) {
var_v0 = 2 - 1;
}
if (((this->index + gGameFrameCount) & var_v0) == 0) {
this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC));
this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(spDC))));
@@ -2156,7 +2120,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y;
Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f);
Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f);
@@ -2177,7 +2140,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[13] -= (this->fwork[13] * 0.1f);
this->fwork[14] -= (this->fwork[14] * 0.1f);
this->fwork[12] -= (this->fwork[12] * 0.1f);
if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) {
this->obj.pos.y = gGroundHeight + 40.0f;
this->vel.y = 0.0f;
@@ -2238,7 +2200,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
radarMark->pos.y = this->obj.pos.y;
radarMark->pos.z = this->obj.pos.z;
radarMark->yRot = this->rot_0F4.y + 180.0f;
if (this->iwork[1] != 0) {
this->iwork[1]--;
if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) {
@@ -2272,7 +2233,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
sp90.x = this->vel.x;
sp90.y = this->vel.y;
sp90.z = this->vel.z;
temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3);
if (temp_v0_27 != 0) {
this->obj.pos.x -= this->vel.x;
-5
View File
@@ -2276,14 +2276,12 @@ void PlayerShot_Update(PlayerShot* shot) {
switch (shot->obj.status) {
case SHOT_FREE:
break;
case SHOT_ACTIVE:
ticks = 1;
switch (shot->obj.id) {
case PLAYERSHOT_GFOX_LASER:
ticks = 4;
break;
case PLAYERSHOT_SINGLE_LASER:
case PLAYERSHOT_TWIN_LASER:
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
@@ -2292,12 +2290,10 @@ void PlayerShot_Update(PlayerShot* shot) {
ticks = 3;
}
break;
case PLAYERSHOT_TANK:
ticks = 2;
break;
}
for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) {
if (shot->timer > 0) {
shot->timer--;
@@ -2308,7 +2304,6 @@ void PlayerShot_Update(PlayerShot* shot) {
PlayerShot_UpdateShot(shot, i);
}
break;
case SHOT_HITMARK:
PlayerShot_UpdateHitmark(shot);
break;
-23
View File
@@ -283,7 +283,6 @@ void Background_DrawBackdrop(void) {
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
if (gCurrentLevel == LEVEL_FORTUNA) {
Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY);
} else if (gCurrentLevel == LEVEL_KATINA) {
@@ -352,7 +351,6 @@ void Background_DrawBackdrop(void) {
gSPDisplayList(gMasterDisp++, D_VE1_60046F0);
break;
}
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -438,7 +436,6 @@ void Background_DrawBackdrop(void) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
gSPDisplayList(gMasterDisp++, D_AQ_601AFF0);
} else {
@@ -469,7 +466,6 @@ void Background_DrawBackdrop(void) {
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114;
sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f);
sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f
if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
(gPlayer[0].csState < 3)) {
D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f;
@@ -485,7 +481,6 @@ void Background_DrawBackdrop(void) {
RCP_SetupDL_17();
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) {
Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY);
} else if (gCurrentLevel == LEVEL_SOLAR) {
@@ -682,7 +677,6 @@ void Background_DrawBackdrop(void) {
}
Matrix_Pop(&gGfxMatrix);
}
if (gStarWarpDistortion > 0.0f) {
f32* xStar = gStarOffsetsX;
f32* yStar = gStarOffsetsY;
@@ -690,7 +684,6 @@ void Background_DrawBackdrop(void) {
RCP_SetupDL_14();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255);
zRot = 0.0f;
for (i = 0; i < 300; i++, xStar++, yStar++) {
*xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
@@ -725,12 +718,10 @@ void Background_DrawSun(void) {
(gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) {
return;
}
gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType];
if (gPlayerGlareAlphas[gPlayerNum] > 300) {
gPlayerGlareAlphas[gPlayerNum] = 0;
}
if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) ||
(((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) ||
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
@@ -738,7 +729,6 @@ void Background_DrawSun(void) {
gPlayerGlareReds[gPlayerNum] = 128;
gPlayerGlareGreens[gPlayerNum] = 128;
gPlayerGlareBlues[gPlayerNum] = 128;
camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw);
camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch);
if (camPitch > 180.0f) {
@@ -756,7 +746,6 @@ void Background_DrawSun(void) {
gSunViewY -= 60.0f;
gSunViewX -= 480.0f;
}
if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) {
gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2;
if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) {
@@ -764,7 +753,6 @@ void Background_DrawSun(void) {
}
}
}
if (gPlayerGlareAlphas[gPlayerNum] != 0) {
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
@@ -774,14 +762,12 @@ void Background_DrawSun(void) {
sunAlpha = sSunAlphas;
sunDL = sSunDLs;
sunScale = sSunScales;
if (gCurrentLevel == LEVEL_KATINA) {
sunColor = sKaSunColors;
sunAlpha = sKaSunAlphas;
sunDL = sKaSunDLs;
sunScale = sKaSunScales;
}
for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY);
@@ -810,13 +796,11 @@ void Background_DrawLensFlare(void) {
(gPlayerGlareAlphas[gPlayerNum] == 0)) {
return;
}
alphaMod = 1.0f;
if (gPlayerGlareAlphas[gPlayerNum] < 80) {
alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f;
}
alphaMod *= sLensFlareAlphaMod[gLevelType];
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY);
@@ -828,7 +812,6 @@ void Background_DrawLensFlare(void) {
lensFlareDL = &sSunDLs[5];
lensFlareScale = &sSunScales[5];
lensFlareShift = &sSunShifts[5];
if (gCurrentLevel == LEVEL_KATINA) {
lensFlareColor = &sKaSunColors[5];
lensFlareAlpha = &sKaSunAlphas[5];
@@ -836,7 +819,6 @@ void Background_DrawLensFlare(void) {
lensFlareScale = &sKaSunScales[5];
lensFlareShift = &sKaSunShifts[5];
}
for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f,
@@ -1067,7 +1049,6 @@ void Background_DrawGround(void) {
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
sp1C0 = D_AQ_600AB10;
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) {
gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32,
@@ -1091,7 +1072,6 @@ void Background_DrawGround(void) {
gSPDisplayList(gMasterDisp++, sp1C0);
Matrix_Pop(&gGfxMatrix);
}
if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) {
gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32,
32);
@@ -1105,7 +1085,6 @@ void Background_DrawGround(void) {
} else {
RCP_SetupDL(&gMasterDisp, SETUPDL_37);
}
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
@@ -1137,7 +1116,6 @@ void Background_DrawGround(void) {
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
@@ -1161,7 +1139,6 @@ void Background_DrawGround(void) {
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
-2
View File
@@ -1938,7 +1938,6 @@ void func_demo_8004E4D4(ActorCutscene* this) {
if (this->fwork[9] > 50.0f) {
this->fwork[9] = 50.0f;
}
if (this->timer_0BE == 0) {
switch (this->index) {
case 1:
@@ -2920,7 +2919,6 @@ void Cutscene_DrawGreatFox(void) {
((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) {
RCP_SetupDL_49();
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
for (i = 0, var_s6_2 = D_demo_800CA0BC; i < ARRAY_COUNT(sp9C); i++, var_s6_2++) {
if ((i != 1) || gGreatFoxIntact) {
sp9C[i] = 0.0f;
-23
View File
@@ -35,13 +35,11 @@ void Display_DrawHelpAlert(void) {
if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) {
return;
}
if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
return;
}
if (gTeamHelpTimer != 0) {
gTeamHelpTimer--;
if (gTeamHelpTimer == 0) {
@@ -262,7 +260,6 @@ void Display_OnFootCharacter(Player* player) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY);
switch (player->num) {
case 0:
Animation_DrawSkeleton(5, aVsOnFootFoxSkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw,
@@ -303,7 +300,6 @@ void Display_Landmaster(Player* player) {
Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY);
if (gPlayerNum == player->num) {
sp64 = 0.0f;
if (gChargeTimers[player->num] >= 20) {
@@ -343,7 +339,6 @@ f32 sPlayerShadowing = 0.0f;
void Display_LandmasterMuzzleFlash(Player* player) {
Matrix_Push(&gGfxMatrix);
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) {
Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y,
D_display_80161548[player->num].z, MTXF_APPLY);
@@ -718,7 +713,6 @@ void Display_Reticle(Player* player) {
translate = &D_display_801613E0[i];
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY);
if (gChargeTimers[player->num] >= 20) {
RCP_SetupDL(&gMasterDisp, SETUPDL_63);
if (i == 1) {
@@ -844,7 +838,6 @@ void Display_LandmasterEngineGlow_Draw(Player* player) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, player->bankAngle * M_DTOR, MTXF_APPLY);
if (player->form == FORM_LANDMASTER) {
if (player->unk_194 <= 0.0f) {
Matrix_Pop(&gGfxMatrix);
@@ -904,7 +897,6 @@ void Display_BarrelRollShield(Player* player) {
} else {
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
}
if (player->baseRollRate < 0) {
Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY);
}
@@ -948,7 +940,6 @@ void Display_ArwingLaserCharge(Player* player) {
if (gChargeTimers[player->num] > 10) {
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
@@ -968,7 +959,6 @@ void Display_ArwingLaserCharge(Player* player) {
} else {
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
}
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
@@ -1014,7 +1004,6 @@ void Display_ArwingLaserCharge(Player* player) {
gSPDisplayList(gMasterDisp++, aOrbDL);
Matrix_Pop(&gGfxMatrix);
}
if (gMuzzleFlashScale[player->num] > 0.1f) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
@@ -1029,7 +1018,6 @@ void Display_ArwingLaserCharge(Player* player) {
case LASERS_SINGLE:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128);
gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128);
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
@@ -1037,7 +1025,6 @@ void Display_ArwingLaserCharge(Player* player) {
}
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f,
MTXF_APPLY);
@@ -1160,7 +1147,6 @@ void Display_PlayerFeatures(Player* player) {
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR),
MTXF_APPLY);
Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY);
var_fv0 = player->unk_194 * 30.0f;
if (var_fv0 > 30.0f) {
var_fv0 = 30.0f;
@@ -1213,7 +1199,6 @@ void Display_ArwingWingTrail_Draw(Player* player) {
sp5C = 108.0f;
sp58 = -22.0f;
}
if (player->contrailScale != 0.0f) {
sp54 = 0.0f;
if ((gGameFrameCount % 2) != 0) {
@@ -1588,7 +1573,6 @@ void Display_LockOnIndicator(void) {
}
}
}
for (j = 0; j < gCamCount; j++) {
gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f;
gLockOnTargetViewPos[j].z = 100.0f;
@@ -1644,7 +1628,6 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
if (sp38 < 0.0f) {
sp38 += 360.0f;
}
sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->rot.y;
if (sp3C > 360.0f) {
sp3C -= 360.0f;
@@ -1692,13 +1675,11 @@ void Display_Update(void) {
}
Matrix_Push(&gGfxMatrix);
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f);
} else {
Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f);
}
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
@@ -1745,7 +1726,6 @@ void Display_Update(void) {
gPlayCamAt.y = camPlayer->cam.at.y;
gPlayCamAt.z = camPlayer->cam.at.z;
}
camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z);
camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y,
sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x)));
@@ -1756,7 +1736,6 @@ void Display_Update(void) {
tempVec.y = 100.0f;
tempVec.z = 0.0f;
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
if (gStarCount != 0) {
gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll);
Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z);
@@ -1816,7 +1795,6 @@ void Display_Update(void) {
TexturedLine_Draw();
gReflectY = 1;
PlayerShot_DrawAll();
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
@@ -1842,7 +1820,6 @@ void Display_Update(void) {
if (gCurrentLevel == LEVEL_AQUAS) {
Effect_Draw(0);
}
if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) {
D_bg_8015F964 = true;
Effect_Draw(1);
-14
View File
@@ -684,7 +684,6 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
}
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
break;
case OBJ_ACTOR_CUTSCENE:
case OBJ_ACTOR_TEAM_BOSS:
case OBJ_ACTOR_EVENT:
@@ -739,7 +738,6 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
case OBJ_BOSS_CO_CARRIER_UPPER:
case OBJ_BOSS_CO_CARRIER_BOTTOM:
COS_DEG(gBosses[index].obj.rot.z);
if (gGroundSurface == SURFACE_WATER) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
} else {
@@ -1103,7 +1101,6 @@ void Actor_DrawOnRails(Actor* this) {
Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]);
}
}
if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) {
sp34.y += this->info.targetOffset;
Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]);
@@ -1124,7 +1121,6 @@ void Actor_DrawAllRange(Actor* this) {
f32 var_fv1;
sDrewActor = false;
if (this->info.drawType == 2) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW);
@@ -1139,7 +1135,6 @@ void Actor_DrawAllRange(Actor* this) {
var_fv0 = 1000.0f;
var_fv1 = -25000.0f;
}
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
@@ -1172,7 +1167,6 @@ void Actor_DrawAllRange(Actor* this) {
var_fv1 = -20000.0f;
var_fa1 = 0.5f;
}
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
@@ -1212,7 +1206,6 @@ void Actor_DrawAllRange(Actor* this) {
}
}
}
Object_SetSfxSourceToView(this->sfxSource, &sViewPos);
this->iwork[24] = sDrewActor;
}
@@ -1444,7 +1437,6 @@ void Object_DrawShadow(s32 index, Object* obj) {
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + gPathProgress, MTXF_APPLY);
break;
}
if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) ||
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY);
@@ -1598,7 +1590,6 @@ void Display_SetSecondLight(Vec3f* pos) {
sp9C.x = pos->x - gLight3x;
sp9C.y = pos->y - gLight3y;
sp9C.z = pos->z - gLight3z;
lightDist = VEC3F_MAG(&sp9C);
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
lightFade = 700.0f / lightDist;
@@ -1622,7 +1613,6 @@ void Display_SetSecondLight(Vec3f* pos) {
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY);
sp6C.x = 0.0f;
sp6C.y = 0.0f;
sp6C.z = -100.0f;
@@ -1698,7 +1688,6 @@ void Object_DrawAll(s32 arg0) {
}
} else {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
if (scenery->obj.status >= OBJ_ACTIVE) {
if (arg0 > 0) {
@@ -1720,7 +1709,6 @@ void Object_DrawAll(s32 arg0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
}
Object_SetCullDirection(arg0);
Matrix_Push(&gGfxMatrix);
Boss_Draw(boss, arg0);
@@ -1773,7 +1761,6 @@ void Object_DrawAll(s32 arg0) {
case LEVELMODE_ON_RAILS:
case LEVELMODE_TURRET:
Matrix_Push(&gGfxMatrix);
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) {
Display_SetSecondLight(&actor->obj.pos);
@@ -1874,7 +1861,6 @@ void Effect_DrawAll(s32 arg0) {
void Object_Draw(s32 arg0) {
gReflectY = 1;
Object_DrawAll(1);
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
gReflectY = -1;
Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
-18
View File
@@ -562,7 +562,6 @@ void Object_LoadLevelObjects(void) {
} else {
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
}
if (gGroundClipMode == 0) {
for (j = 0; j < gDrawSmallRocks; j++) {
if (gCurrentLevel == LEVEL_AQUAS) {
@@ -697,7 +696,6 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x
for (i = 0; i < count; i++, hitboxData += 6) {
rotate = 0.0f;
hitRot.x = hitRot.y = hitRot.z = 0.0f;
if (*hitboxData >= HITBOX_SHADOW) {
return false;
}
@@ -2003,7 +2001,6 @@ void Item_CheckBounds(Item* this) {
Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath - var_fa1, 0.1f, 10.0f, 0.01f);
}
}
if (this->obj.pos.y > 650.0f) {
Math_SmoothStepToF(&this->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f);
}
@@ -2018,7 +2015,6 @@ void Item_CheckBounds(Item* this) {
} else if (this->obj.pos.y < -500.0f) {
Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f);
}
if (gVersusMode && (this->index == 0) && (gItems[1].obj.status == OBJ_ACTIVE)) {
if (fabsf(this->obj.pos.x - gItems[1].obj.pos.x) < 200.0f) {
if (fabsf(this->obj.pos.z - gItems[1].obj.pos.z) < 200.0f) {
@@ -2103,7 +2099,6 @@ void ActorSupplies_Update(ActorSupplies* this) {
Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f);
}
}
if (this->dmgType != DMG_NONE) {
this->dmgType = DMG_NONE;
this->health -= this->damage;
@@ -2184,7 +2179,6 @@ void func_enmy_80067A40(void) {
void Item1up_Update(Item1UP* this) {
Item_CheckBounds(this);
Item_SpinPickup(this);
if (this->collected) {
Object_Kill(&this->obj, this->sfxSource);
Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum);
@@ -2201,7 +2195,6 @@ void Item1up_Update(Item1UP* this) {
void ItemPickup_Update(Item* this) {
Item_CheckBounds(this);
Item_SpinPickup(this);
if (this->state == 0) {
switch (this->obj.id) {
case OBJ_ITEM_BOMB:
@@ -2219,7 +2212,6 @@ void ItemPickup_Update(Item* this) {
case OBJ_ITEM_LASERS:
this->width = 18.0f;
if (this->collected) {
this->timer_4A = 50;
this->state = 1;
@@ -2238,7 +2230,6 @@ void ItemPickup_Update(Item* this) {
} else {
gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60;
}
gRightWingFlashTimer[this->playerNum] = 1030;
gLeftWingFlashTimer[this->playerNum] = 1030;
}
@@ -2246,7 +2237,6 @@ void ItemPickup_Update(Item* this) {
}
} else {
Math_SmoothStepToF(&this->width, 2.5f, 1.0f, 0.5f, 0.0f);
this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f;
if (gPlayer[this->playerNum].form == FORM_LANDMASTER) {
@@ -2284,7 +2274,6 @@ void ItemSupplyRing_Update(Item* this) {
Math_SmoothStepToF(&this->width, 0.4f, 1.0f, 0.05f, 0.0f);
Item_CheckBounds(this);
Item_SpinPickup(this);
if (this->collected) {
this->state = 1;
this->timer_48 = 50;
@@ -2332,7 +2321,6 @@ void ItemSupplyRing_Update(Item* this) {
} else {
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f;
}
if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f;
} else {
@@ -2340,7 +2328,6 @@ void ItemSupplyRing_Update(Item* this) {
}
this->obj.rot.z += 22.0f;
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f,
0.0f);
if (this->timer_48 == 0) {
@@ -2372,7 +2359,6 @@ void ItemGoldRing_Update(ItemGoldRing* this) {
void ItemWingRepair_Update(ItemWingRepair* this) {
Item_CheckBounds(this);
Item_SpinPickup(this);
if (this->collected) {
func_enmy_80067A40();
Object_Kill(&this->obj, this->sfxSource);
@@ -2385,7 +2371,6 @@ void ItemWingRepair_Update(ItemWingRepair* this) {
void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
Item_CheckBounds(this);
if (this->state > 0) {
if (this->state == 1) {
this->obj.rot.z -= 10.0f;
@@ -2404,7 +2389,6 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
}
} else {
this->width = 100.0f;
if (gRingPassCount < 0) {
this->state = 2;
this->unk_44 = 255;
@@ -2491,7 +2475,6 @@ void ItemRingCheck_Update(Item* this) {
void ItemPathChange_Update(Item* this) {
gLastPathChange = this->obj.id;
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
Object_Kill(&this->obj, this->sfxSource);
} else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) {
@@ -3032,7 +3015,6 @@ void TexturedLine_Update(TexturedLine* this) {
}
}
}
if (((this->posAA.z + gPathProgress) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) {
this->mode = 0;
}
-2
View File
@@ -153,7 +153,6 @@ void MeHopBot_Update(MeHopBot* this) {
this->obj.rot.y = Math_RadToDeg(
Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].trueZpos - this->obj.pos.z));
if (this->obj.pos.y < -500.0f) {
this->obj.pos.y = -500.0f;
this->vel.y = 0.0f;
@@ -457,7 +456,6 @@ void CoMoleMissile_Update(CoMoleMissile* this) {
if (this->vel.y < 12.0f) {
Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f);
}
if (this->obj.pos.y < (gGroundHeight + 10.0f)) {
this->obj.pos.y = gGroundHeight;
this->state = 4;

Some files were not shown because too many files have changed in this diff Show More