mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 05:25:01 +03:00
Repo upstreamed
This commit is contained in:
parent
6248c70be1
commit
7c801d33d9
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -152,6 +152,8 @@
|
|||||||
"ast_a_ti.h": "c",
|
"ast_a_ti.h": "c",
|
||||||
"fox_co.h": "c",
|
"fox_co.h": "c",
|
||||||
"ast_map.h": "c"
|
"ast_map.h": "c"
|
||||||
|
"xmemory": "c",
|
||||||
|
"iosfwd": "c"
|
||||||
},
|
},
|
||||||
"C_Cpp_Runner.msvcBatchPath": ""
|
"C_Cpp_Runner.msvcBatchPath": ""
|
||||||
}
|
}
|
@ -7,7 +7,11 @@
|
|||||||
header:
|
header:
|
||||||
- '#include "gfx.h"'
|
- '#include "gfx.h"'
|
||||||
- '#include "sf64object.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:
|
D_TI_A000000:
|
||||||
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000}
|
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000}
|
||||||
|
|
||||||
|
@ -10,11 +10,19 @@
|
|||||||
header:
|
header:
|
||||||
- '#include "gfx.h"'
|
- '#include "gfx.h"'
|
||||||
- '#include "sf64object.h"'
|
- '#include "sf64object.h"'
|
||||||
|
<<<<<<< HEAD
|
||||||
external_files:
|
external_files:
|
||||||
- "assets/yaml/us/rev1/ast_7_ti_2.yaml"
|
- "assets/yaml/us/rev1/ast_7_ti_2.yaml"
|
||||||
- "assets/yaml/us/rev1/ast_8_ti.yaml"
|
- "assets/yaml/us/rev1/ast_8_ti.yaml"
|
||||||
- "assets/yaml/us/rev1/ast_9_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:
|
D_TI_A000000:
|
||||||
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000}
|
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000}
|
||||||
|
|
||||||
@ -65,4 +73,7 @@ D_TI_A002170:
|
|||||||
|
|
||||||
D_TI_A009990:
|
D_TI_A009990:
|
||||||
{type: SF64:ANIM, offset: 0xA009990, symbol: D_TI_A009990}
|
{type: SF64:ANIM, offset: 0xA009990, symbol: D_TI_A009990}
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> 6fe91928 (Repo upstreamed)
|
||||||
|
@ -2,6 +2,15 @@
|
|||||||
#define MODS_H
|
#define MODS_H
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick Boot:
|
* Quick Boot:
|
||||||
* Define this variable to a game state to boot into that
|
* Define this variable to a game state to boot into that
|
||||||
|
@ -18,8 +18,8 @@ void Audio_SetVolume(u8 audioType, u8 volume);
|
|||||||
void Audio_FadeOutAll(u8 fadeoutTime);
|
void Audio_FadeOutAll(u8 fadeoutTime);
|
||||||
void Audio_SetAudioSpec(u8 unused, u16 specParam);
|
void Audio_SetAudioSpec(u8 unused, u16 specParam);
|
||||||
|
|
||||||
#define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((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))
|
#define AUDIO_SET_SPEC_ALT(sfxLayout, spec) // Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec))
|
||||||
|
|
||||||
// used by sys or related
|
// used by sys or related
|
||||||
void AudioLoad_Init(void);
|
void AudioLoad_Init(void);
|
||||||
|
@ -68,17 +68,21 @@
|
|||||||
#define SEGMENT_BSS_END(segment) (segment ## _BSS_END)
|
#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 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) \
|
#define OVERLAY_OFFSETS(file) \
|
||||||
{ { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, \
|
NO_OVERLAY
|
||||||
{ 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 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);
|
u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup);
|
||||||
void Load_InitDmaAndMsg(void);
|
void Load_InitDmaAndMsg(void);
|
||||||
|
@ -34,7 +34,7 @@ void Audio_PlayPauseSfx(u8 active);
|
|||||||
void Audio_PlayMapMenuSfx(u8 active);
|
void Audio_PlayMapMenuSfx(u8 active);
|
||||||
void Audio_KillAllSfx(void);
|
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_18 (1 << 18) // makes distance ignore z position? probably more
|
||||||
#define SFX_FLAG_19 (1 << 19)
|
#define SFX_FLAG_19 (1 << 19)
|
||||||
|
@ -158,7 +158,10 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
|
|||||||
u8* dma;
|
u8* dma;
|
||||||
|
|
||||||
gSampleDmaBuffSize = 0x2D0;
|
gSampleDmaBuffSize = 0x2D0;
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> 6fe91928 (Repo upstreamed)
|
||||||
for (i = 0; i < (3 * gNumNotes * gAudioBufferParams.count); i++) {
|
for (i = 0; i < (3 * gNumNotes * gAudioBufferParams.count); i++) {
|
||||||
dma = AudioHeap_Alloc(&gMiscPool, gSampleDmaBuffSize);
|
dma = AudioHeap_Alloc(&gMiscPool, gSampleDmaBuffSize);
|
||||||
gSampleDmas[gSampleDmaCount].ramAddr = dma;
|
gSampleDmas[gSampleDmaCount].ramAddr = dma;
|
||||||
@ -966,7 +969,6 @@ void AudioLoad_Init(void) {
|
|||||||
static const char devstr38[] = "Entry--- %d %d\n";
|
static const char devstr38[] = "Entry--- %d %d\n";
|
||||||
static const char devstr39[] = "---Block LPS here\n";
|
static const char devstr39[] = "---Block LPS here\n";
|
||||||
static const char devstr40[] = "===Block LPS end\n";
|
static const char devstr40[] = "===Block LPS end\n";
|
||||||
|
|
||||||
s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
|
s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
|
||||||
Sample* sample;
|
Sample* sample;
|
||||||
AudioSlowLoad* slowLoad;
|
AudioSlowLoad* slowLoad;
|
||||||
|
@ -1406,7 +1406,6 @@ void func_800168BC(void) {
|
|||||||
gSeqLayers[i].channel = NULL;
|
gSeqLayers[i].channel = NULL;
|
||||||
gSeqLayers[i].enabled = false;
|
gSeqLayers[i].enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) {
|
for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) {
|
||||||
for (j = 0; j < 16; j++) {
|
for (j = 0; j < 16; j++) {
|
||||||
gSeqPlayers[i].channels[j] = &gSeqChannelNone;
|
gSeqPlayers[i].channels[j] = &gSeqChannelNone;
|
||||||
|
@ -158,7 +158,6 @@ void AllRange_GreatFoxRepair(Player* player) {
|
|||||||
} else {
|
} else {
|
||||||
gCsCamEyeZ = 480.0f;
|
gCsCamEyeZ = 480.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->rot.y = 0.0f;
|
player->rot.y = 0.0f;
|
||||||
player->pos.x = 2100.0f;
|
player->pos.x = 2100.0f;
|
||||||
player->baseSpeed = 30.0f;
|
player->baseSpeed = 30.0f;
|
||||||
@ -193,7 +192,6 @@ void AllRange_GreatFoxRepair(Player* player) {
|
|||||||
player->pos.y = -420.0f;
|
player->pos.y = -420.0f;
|
||||||
player->pos.z = 0.0f;
|
player->pos.z = 0.0f;
|
||||||
player->rot.z = 0.0f;
|
player->rot.z = 0.0f;
|
||||||
|
|
||||||
gCsCamEyeX = -683.0f;
|
gCsCamEyeX = -683.0f;
|
||||||
gCsCamEyeY = -346.0f;
|
gCsCamEyeY = -346.0f;
|
||||||
gCsCamEyeZ = 305.0f;
|
gCsCamEyeZ = 305.0f;
|
||||||
@ -396,7 +394,6 @@ void ActorAllRange_SpawnTeam(void) {
|
|||||||
actor->obj.pos.y = sTeamSpawnPos[i].y;
|
actor->obj.pos.y = sTeamSpawnPos[i].y;
|
||||||
actor->obj.pos.z = sTeamSpawnPos[i].z;
|
actor->obj.pos.z = sTeamSpawnPos[i].z;
|
||||||
actor->aiType = sTeamAi[i];
|
actor->aiType = sTeamAi[i];
|
||||||
|
|
||||||
if (gCurrentLevel == LEVEL_KATINA) {
|
if (gCurrentLevel == LEVEL_KATINA) {
|
||||||
actor->aiIndex = sTeamSpawnTargetsKA[i];
|
actor->aiIndex = sTeamSpawnTargetsKA[i];
|
||||||
} else {
|
} 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.y = gActors[AI360_WOLF].obj.pos.y;
|
||||||
gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z;
|
gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) {
|
if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) {
|
||||||
gAllRangeFrameCount++;
|
gAllRangeFrameCount++;
|
||||||
for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) {
|
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].iwork[2] = AI360_FOX;
|
||||||
gActors[actor->aiIndex].state = STATE360_2;
|
gActors[actor->aiIndex].state = STATE360_2;
|
||||||
gActors[actor->aiIndex].aiIndex = actor->aiType;
|
gActors[actor->aiIndex].aiIndex = actor->aiType;
|
||||||
|
|
||||||
if (gTeamHelpActor == &gActors[actor->aiIndex]) {
|
if (gTeamHelpActor == &gActors[actor->aiIndex]) {
|
||||||
gTeamHelpActor = NULL;
|
gTeamHelpActor = NULL;
|
||||||
gTeamHelpTimer = 0;
|
gTeamHelpTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gActors[actor->aiIndex].iwork[3] == 0) {
|
if (gActors[actor->aiIndex].iwork[3] == 0) {
|
||||||
switch (gActors[actor->aiIndex].aiType) {
|
switch (gActors[actor->aiIndex].aiType) {
|
||||||
case AI360_FALCO:
|
case AI360_FALCO:
|
||||||
@ -559,7 +553,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
|
|||||||
gActors[actor->aiIndex].iwork[3] = 200;
|
gActors[actor->aiIndex].iwork[3] = 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->aiType == AI360_WOLF) {
|
if (actor->aiType == AI360_WOLF) {
|
||||||
if (gCurrentLevel != LEVEL_VENOM_2) {
|
if (gCurrentLevel != LEVEL_VENOM_2) {
|
||||||
actor->state = STATE360_3;
|
actor->state = STATE360_3;
|
||||||
@ -571,7 +564,6 @@ void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gTeamShields[TEAM_ID_FALCO] <= 0) {
|
if (gTeamShields[TEAM_ID_FALCO] <= 0) {
|
||||||
gActors[AI360_LEON].aiIndex = AI360_FOX;
|
gActors[AI360_LEON].aiIndex = AI360_FOX;
|
||||||
}
|
}
|
||||||
@ -629,7 +621,6 @@ void ActorAllRange_UpdateEnemyEvents(Actor* this) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gTeamShields[enemy->aiIndex] > 0) {
|
if (gTeamShields[enemy->aiIndex] > 0) {
|
||||||
ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]);
|
ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]);
|
||||||
if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) &&
|
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 ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeSuppliesSent) {
|
||||||
if (gAllRangeWingRepairTimer != 0) {
|
if (gAllRangeWingRepairTimer != 0) {
|
||||||
gAllRangeWingRepairTimer--;
|
gAllRangeWingRepairTimer--;
|
||||||
@ -879,12 +869,10 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
|
|||||||
if (this->aiType == AI360_GREAT_FOX) {
|
if (this->aiType == AI360_GREAT_FOX) {
|
||||||
this->dmgType = DMG_NONE;
|
this->dmgType = DMG_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) {
|
if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) {
|
||||||
this->damage = 10;
|
this->damage = 10;
|
||||||
this->timer_0C2 = 10;
|
this->timer_0C2 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) &&
|
if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) &&
|
||||||
(this->dmgType == DMG_EXPLOSION)) {
|
(this->dmgType == DMG_EXPLOSION)) {
|
||||||
this->dmgType = DMG_NONE;
|
this->dmgType = DMG_NONE;
|
||||||
@ -911,7 +899,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
|
|||||||
this->dmgSource = 0;
|
this->dmgSource = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->aiType >= AI360_WOLF) {
|
if (this->aiType >= AI360_WOLF) {
|
||||||
if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) &&
|
if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) &&
|
||||||
!((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) {
|
!((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) {
|
||||||
@ -954,7 +941,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->timer_0C6 = 50;
|
this->timer_0C6 = 50;
|
||||||
this->iwork[8] = 20;
|
this->iwork[8] = 20;
|
||||||
this->obj.status = OBJ_DYING;
|
this->obj.status = OBJ_DYING;
|
||||||
@ -1008,7 +994,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
gKaAllyKillCount++;
|
gKaAllyKillCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (this->aiType) {
|
switch (this->aiType) {
|
||||||
case AI360_WOLF:
|
case AI360_WOLF:
|
||||||
gStarWolfTeamAlive[0] = 0;
|
gStarWolfTeamAlive[0] = 0;
|
||||||
@ -1067,7 +1052,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AI360_FALCO + NPC_SHOT_ID + 1:
|
case AI360_FALCO + NPC_SHOT_ID + 1:
|
||||||
case AI360_SLIPPY + NPC_SHOT_ID + 1:
|
case AI360_SLIPPY + NPC_SHOT_ID + 1:
|
||||||
case AI360_PEPPY + NPC_SHOT_ID + 1:
|
case AI360_PEPPY + NPC_SHOT_ID + 1:
|
||||||
@ -1230,7 +1214,6 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
|
|||||||
} else {
|
} else {
|
||||||
Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY);
|
Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
|
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
|
||||||
gTeamHelpActor = this;
|
gTeamHelpActor = this;
|
||||||
gTeamHelpTimer = 320;
|
gTeamHelpTimer = 320;
|
||||||
@ -1317,7 +1300,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
ActorAllRange_UpdateEvents(this);
|
ActorAllRange_UpdateEvents(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) {
|
if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) {
|
||||||
switch (RAND_INT(3.9f)) {
|
switch (RAND_INT(3.9f)) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -1358,7 +1340,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
this->work_046 = 0;
|
this->work_046 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_9:
|
case STATE360_9:
|
||||||
this->timer_0BC = RAND_INT(20.0f) + 30;
|
this->timer_0BC = RAND_INT(20.0f) + 30;
|
||||||
if (Rand_ZeroOne() < 0.5f) {
|
if (Rand_ZeroOne() < 0.5f) {
|
||||||
@ -1373,7 +1354,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
this->fwork[19] += 360.0f;
|
this->fwork[19] += 360.0f;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_10:
|
case STATE360_10:
|
||||||
this->timer_0BC = 35;
|
this->timer_0BC = 35;
|
||||||
if (Rand_ZeroOne() < 0.5f) {
|
if (Rand_ZeroOne() < 0.5f) {
|
||||||
@ -1389,7 +1369,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->iwork[16] = STATE360_0;
|
this->iwork[16] = STATE360_0;
|
||||||
spCC = spC8 = spC4 = 0.0f;
|
spCC = spC8 = spC4 = 0.0f;
|
||||||
|
|
||||||
@ -1461,7 +1440,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
|
|
||||||
sp104 = 0;
|
sp104 = 0;
|
||||||
this->iwork[5] = 0;
|
this->iwork[5] = 0;
|
||||||
|
|
||||||
if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) &&
|
if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) &&
|
||||||
(this->state != STATE360_6)) {
|
(this->state != STATE360_6)) {
|
||||||
this->state = STATE360_6;
|
this->state = STATE360_6;
|
||||||
@ -1517,7 +1495,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
sp104 = 2;
|
sp104 = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_5:
|
case STATE360_5:
|
||||||
SectorZ_Missile_Update(this);
|
SectorZ_Missile_Update(this);
|
||||||
sp104 = 1;
|
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);
|
Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.03f, 0.5f, 0.0f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_1:
|
case STATE360_1:
|
||||||
this->fwork[1] = 40.0f;
|
this->fwork[1] = 40.0f;
|
||||||
|
|
||||||
@ -1566,7 +1542,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_2:
|
case STATE360_2:
|
||||||
sp104 = 1;
|
sp104 = 1;
|
||||||
spF8 = 800.0f;
|
spF8 = 800.0f;
|
||||||
@ -1618,14 +1593,12 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f;
|
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f;
|
||||||
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
|
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gPlayer[0].somersault) {
|
if (!gPlayer[0].somersault) {
|
||||||
this->fwork[4] = gPlayer[0].pos.x + spCC;
|
this->fwork[4] = gPlayer[0].pos.x + spCC;
|
||||||
this->fwork[5] = gPlayer[0].pos.y + spC8;
|
this->fwork[5] = gPlayer[0].pos.y + spC8;
|
||||||
this->fwork[6] = gPlayer[0].trueZpos + spC4;
|
this->fwork[6] = gPlayer[0].trueZpos + spC4;
|
||||||
this->fwork[1] = gPlayer[0].baseSpeed + 10.0f;
|
this->fwork[1] = gPlayer[0].baseSpeed + 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) {
|
if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) {
|
||||||
this->fwork[3] = 3.0f;
|
this->fwork[3] = 3.0f;
|
||||||
this->fwork[1] = gPlayer[0].baseSpeed - 5.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[6] = gBosses[0].obj.pos.z;
|
||||||
this->fwork[1] = 40.0f;
|
this->fwork[1] = 40.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) {
|
if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) {
|
||||||
if (spE8 < spF8) {
|
if (spE8 < spF8) {
|
||||||
if (spEC < spF8) {
|
if (spEC < spF8) {
|
||||||
@ -1899,7 +1871,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
} else {
|
} else {
|
||||||
this->iwork[4] = 0;
|
this->iwork[4] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) ||
|
if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) ||
|
||||||
(gActors[this->aiIndex].state == STATE360_6) ||
|
(gActors[this->aiIndex].state == STATE360_6) ||
|
||||||
(gActors[this->aiIndex].obj.status == OBJ_FREE))) {
|
(gActors[this->aiIndex].obj.status == OBJ_FREE))) {
|
||||||
@ -1911,7 +1882,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_3:
|
case STATE360_3:
|
||||||
sp104 = 1;
|
sp104 = 1;
|
||||||
if (this->timer_0BC == 0) {
|
if (this->timer_0BC == 0) {
|
||||||
@ -1932,7 +1902,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
this->fwork[3] = 1.0f;
|
this->fwork[3] = 1.0f;
|
||||||
this->fwork[1] = 38.0f;
|
this->fwork[1] = 38.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) {
|
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) {
|
||||||
this->fwork[10] = 30.0f;
|
this->fwork[10] = 30.0f;
|
||||||
}
|
}
|
||||||
@ -1991,7 +1960,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_7:
|
case STATE360_7:
|
||||||
this->fwork[1] = 40.0f;
|
this->fwork[1] = 40.0f;
|
||||||
Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f);
|
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;
|
this->state = STATE360_3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_8:
|
case STATE360_8:
|
||||||
this->fwork[1] = 40.0f;
|
this->fwork[1] = 40.0f;
|
||||||
if ((this->index % 2) != 0) {
|
if ((this->index % 2) != 0) {
|
||||||
@ -2034,7 +2001,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_9:
|
case STATE360_9:
|
||||||
this->fwork[1] = 40.0f;
|
this->fwork[1] = 40.0f;
|
||||||
if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.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;
|
this->state = STATE360_3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE360_10:
|
case STATE360_10:
|
||||||
sp104 = 1;
|
sp104 = 1;
|
||||||
if (this->timer_0BC == 0) {
|
if (this->timer_0BC == 0) {
|
||||||
@ -2069,7 +2034,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
if (gCurrentLevel == LEVEL_VENOM_2) {
|
if (gCurrentLevel == LEVEL_VENOM_2) {
|
||||||
var_v0 = 2 - 1;
|
var_v0 = 2 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((this->index + gGameFrameCount) & var_v0) == 0) {
|
if (((this->index + gGameFrameCount) & var_v0) == 0) {
|
||||||
this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC));
|
this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC));
|
||||||
this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(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.x = -this->rot_0F4.x;
|
||||||
this->obj.rot.y = this->rot_0F4.y;
|
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[0], this->fwork[1], 0.2f, 1.0f, 0.1f);
|
||||||
Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 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[13] -= (this->fwork[13] * 0.1f);
|
||||||
this->fwork[14] -= (this->fwork[14] * 0.1f);
|
this->fwork[14] -= (this->fwork[14] * 0.1f);
|
||||||
this->fwork[12] -= (this->fwork[12] * 0.1f);
|
this->fwork[12] -= (this->fwork[12] * 0.1f);
|
||||||
|
|
||||||
if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) {
|
if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) {
|
||||||
this->obj.pos.y = gGroundHeight + 40.0f;
|
this->obj.pos.y = gGroundHeight + 40.0f;
|
||||||
this->vel.y = 0.0f;
|
this->vel.y = 0.0f;
|
||||||
@ -2238,7 +2200,6 @@ void ActorAllRange_Update(ActorAllRange* this) {
|
|||||||
radarMark->pos.y = this->obj.pos.y;
|
radarMark->pos.y = this->obj.pos.y;
|
||||||
radarMark->pos.z = this->obj.pos.z;
|
radarMark->pos.z = this->obj.pos.z;
|
||||||
radarMark->yRot = this->rot_0F4.y + 180.0f;
|
radarMark->yRot = this->rot_0F4.y + 180.0f;
|
||||||
|
|
||||||
if (this->iwork[1] != 0) {
|
if (this->iwork[1] != 0) {
|
||||||
this->iwork[1]--;
|
this->iwork[1]--;
|
||||||
if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) {
|
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.x = this->vel.x;
|
||||||
sp90.y = this->vel.y;
|
sp90.y = this->vel.y;
|
||||||
sp90.z = this->vel.z;
|
sp90.z = this->vel.z;
|
||||||
|
|
||||||
temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3);
|
temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3);
|
||||||
if (temp_v0_27 != 0) {
|
if (temp_v0_27 != 0) {
|
||||||
this->obj.pos.x -= this->vel.x;
|
this->obj.pos.x -= this->vel.x;
|
||||||
|
@ -2276,14 +2276,12 @@ void PlayerShot_Update(PlayerShot* shot) {
|
|||||||
switch (shot->obj.status) {
|
switch (shot->obj.status) {
|
||||||
case SHOT_FREE:
|
case SHOT_FREE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOT_ACTIVE:
|
case SHOT_ACTIVE:
|
||||||
ticks = 1;
|
ticks = 1;
|
||||||
switch (shot->obj.id) {
|
switch (shot->obj.id) {
|
||||||
case PLAYERSHOT_GFOX_LASER:
|
case PLAYERSHOT_GFOX_LASER:
|
||||||
ticks = 4;
|
ticks = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLAYERSHOT_SINGLE_LASER:
|
case PLAYERSHOT_SINGLE_LASER:
|
||||||
case PLAYERSHOT_TWIN_LASER:
|
case PLAYERSHOT_TWIN_LASER:
|
||||||
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||||
@ -2292,12 +2290,10 @@ void PlayerShot_Update(PlayerShot* shot) {
|
|||||||
ticks = 3;
|
ticks = 3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLAYERSHOT_TANK:
|
case PLAYERSHOT_TANK:
|
||||||
ticks = 2;
|
ticks = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) {
|
for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) {
|
||||||
if (shot->timer > 0) {
|
if (shot->timer > 0) {
|
||||||
shot->timer--;
|
shot->timer--;
|
||||||
@ -2308,7 +2304,6 @@ void PlayerShot_Update(PlayerShot* shot) {
|
|||||||
PlayerShot_UpdateShot(shot, i);
|
PlayerShot_UpdateShot(shot, i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOT_HITMARK:
|
case SHOT_HITMARK:
|
||||||
PlayerShot_UpdateHitmark(shot);
|
PlayerShot_UpdateHitmark(shot);
|
||||||
break;
|
break;
|
||||||
|
@ -283,7 +283,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
|
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_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
||||||
|
|
||||||
if (gCurrentLevel == LEVEL_FORTUNA) {
|
if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||||
Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY);
|
||||||
} else if (gCurrentLevel == LEVEL_KATINA) {
|
} else if (gCurrentLevel == LEVEL_KATINA) {
|
||||||
@ -352,7 +351,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
gSPDisplayList(gMasterDisp++, D_VE1_60046F0);
|
gSPDisplayList(gMasterDisp++, D_VE1_60046F0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
|
|
||||||
@ -438,7 +436,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
|
|
||||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||||
gSPDisplayList(gMasterDisp++, D_AQ_601AFF0);
|
gSPDisplayList(gMasterDisp++, D_AQ_601AFF0);
|
||||||
} else {
|
} else {
|
||||||
@ -469,7 +466,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114;
|
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114;
|
||||||
sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f);
|
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
|
sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f
|
||||||
|
|
||||||
if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
||||||
(gPlayer[0].csState < 3)) {
|
(gPlayer[0].csState < 3)) {
|
||||||
D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f;
|
D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f;
|
||||||
@ -485,7 +481,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
RCP_SetupDL_17();
|
RCP_SetupDL_17();
|
||||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
|
||||||
|
|
||||||
if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) {
|
if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) {
|
||||||
Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY);
|
||||||
} else if (gCurrentLevel == LEVEL_SOLAR) {
|
} else if (gCurrentLevel == LEVEL_SOLAR) {
|
||||||
@ -682,7 +677,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
}
|
}
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gStarWarpDistortion > 0.0f) {
|
if (gStarWarpDistortion > 0.0f) {
|
||||||
f32* xStar = gStarOffsetsX;
|
f32* xStar = gStarOffsetsX;
|
||||||
f32* yStar = gStarOffsetsY;
|
f32* yStar = gStarOffsetsY;
|
||||||
@ -690,7 +684,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
|
|
||||||
RCP_SetupDL_14();
|
RCP_SetupDL_14();
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255);
|
||||||
|
|
||||||
zRot = 0.0f;
|
zRot = 0.0f;
|
||||||
for (i = 0; i < 300; i++, xStar++, yStar++) {
|
for (i = 0; i < 300; i++, xStar++, yStar++) {
|
||||||
*xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
|
*xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
|
||||||
@ -725,12 +718,10 @@ void Background_DrawSun(void) {
|
|||||||
(gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) {
|
(gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType];
|
gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType];
|
||||||
if (gPlayerGlareAlphas[gPlayerNum] > 300) {
|
if (gPlayerGlareAlphas[gPlayerNum] > 300) {
|
||||||
gPlayerGlareAlphas[gPlayerNum] = 0;
|
gPlayerGlareAlphas[gPlayerNum] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) ||
|
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_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) ||
|
||||||
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
||||||
@ -738,7 +729,6 @@ void Background_DrawSun(void) {
|
|||||||
gPlayerGlareReds[gPlayerNum] = 128;
|
gPlayerGlareReds[gPlayerNum] = 128;
|
||||||
gPlayerGlareGreens[gPlayerNum] = 128;
|
gPlayerGlareGreens[gPlayerNum] = 128;
|
||||||
gPlayerGlareBlues[gPlayerNum] = 128;
|
gPlayerGlareBlues[gPlayerNum] = 128;
|
||||||
|
|
||||||
camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw);
|
camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw);
|
||||||
camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch);
|
camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch);
|
||||||
if (camPitch > 180.0f) {
|
if (camPitch > 180.0f) {
|
||||||
@ -756,7 +746,6 @@ void Background_DrawSun(void) {
|
|||||||
gSunViewY -= 60.0f;
|
gSunViewY -= 60.0f;
|
||||||
gSunViewX -= 480.0f;
|
gSunViewX -= 480.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) {
|
if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) {
|
||||||
gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2;
|
gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2;
|
||||||
if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) {
|
if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) {
|
||||||
@ -764,7 +753,6 @@ void Background_DrawSun(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPlayerGlareAlphas[gPlayerNum] != 0) {
|
if (gPlayerGlareAlphas[gPlayerNum] != 0) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||||
@ -774,14 +762,12 @@ void Background_DrawSun(void) {
|
|||||||
sunAlpha = sSunAlphas;
|
sunAlpha = sSunAlphas;
|
||||||
sunDL = sSunDLs;
|
sunDL = sSunDLs;
|
||||||
sunScale = sSunScales;
|
sunScale = sSunScales;
|
||||||
|
|
||||||
if (gCurrentLevel == LEVEL_KATINA) {
|
if (gCurrentLevel == LEVEL_KATINA) {
|
||||||
sunColor = sKaSunColors;
|
sunColor = sKaSunColors;
|
||||||
sunAlpha = sKaSunAlphas;
|
sunAlpha = sKaSunAlphas;
|
||||||
sunDL = sKaSunDLs;
|
sunDL = sKaSunDLs;
|
||||||
sunScale = sKaSunScales;
|
sunScale = sKaSunScales;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) {
|
for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY);
|
||||||
@ -810,13 +796,11 @@ void Background_DrawLensFlare(void) {
|
|||||||
(gPlayerGlareAlphas[gPlayerNum] == 0)) {
|
(gPlayerGlareAlphas[gPlayerNum] == 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
alphaMod = 1.0f;
|
alphaMod = 1.0f;
|
||||||
if (gPlayerGlareAlphas[gPlayerNum] < 80) {
|
if (gPlayerGlareAlphas[gPlayerNum] < 80) {
|
||||||
alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f;
|
alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f;
|
||||||
}
|
}
|
||||||
alphaMod *= sLensFlareAlphaMod[gLevelType];
|
alphaMod *= sLensFlareAlphaMod[gLevelType];
|
||||||
|
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY);
|
||||||
@ -828,7 +812,6 @@ void Background_DrawLensFlare(void) {
|
|||||||
lensFlareDL = &sSunDLs[5];
|
lensFlareDL = &sSunDLs[5];
|
||||||
lensFlareScale = &sSunScales[5];
|
lensFlareScale = &sSunScales[5];
|
||||||
lensFlareShift = &sSunShifts[5];
|
lensFlareShift = &sSunShifts[5];
|
||||||
|
|
||||||
if (gCurrentLevel == LEVEL_KATINA) {
|
if (gCurrentLevel == LEVEL_KATINA) {
|
||||||
lensFlareColor = &sKaSunColors[5];
|
lensFlareColor = &sKaSunColors[5];
|
||||||
lensFlareAlpha = &sKaSunAlphas[5];
|
lensFlareAlpha = &sKaSunAlphas[5];
|
||||||
@ -836,7 +819,6 @@ void Background_DrawLensFlare(void) {
|
|||||||
lensFlareScale = &sKaSunScales[5];
|
lensFlareScale = &sKaSunScales[5];
|
||||||
lensFlareShift = &sKaSunShifts[5];
|
lensFlareShift = &sKaSunShifts[5];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) {
|
for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f,
|
Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f,
|
||||||
@ -1067,7 +1049,6 @@ void Background_DrawGround(void) {
|
|||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
|
||||||
sp1C0 = D_AQ_600AB10;
|
sp1C0 = D_AQ_600AB10;
|
||||||
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
|
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
|
||||||
|
|
||||||
if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) {
|
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,
|
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);
|
gSPDisplayList(gMasterDisp++, sp1C0);
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) {
|
if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) {
|
||||||
gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32,
|
gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32,
|
||||||
32);
|
32);
|
||||||
@ -1105,7 +1085,6 @@ void Background_DrawGround(void) {
|
|||||||
} else {
|
} else {
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_37);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_37);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) {
|
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||||
@ -1137,7 +1116,6 @@ void Background_DrawGround(void) {
|
|||||||
} else {
|
} else {
|
||||||
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
|
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
|
||||||
@ -1161,7 +1139,6 @@ void Background_DrawGround(void) {
|
|||||||
} else {
|
} else {
|
||||||
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
|
for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY);
|
||||||
|
@ -1938,7 +1938,6 @@ void func_demo_8004E4D4(ActorCutscene* this) {
|
|||||||
if (this->fwork[9] > 50.0f) {
|
if (this->fwork[9] > 50.0f) {
|
||||||
this->fwork[9] = 50.0f;
|
this->fwork[9] = 50.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->timer_0BE == 0) {
|
if (this->timer_0BE == 0) {
|
||||||
switch (this->index) {
|
switch (this->index) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -2920,7 +2919,6 @@ void Cutscene_DrawGreatFox(void) {
|
|||||||
((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) {
|
((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) {
|
||||||
RCP_SetupDL_49();
|
RCP_SetupDL_49();
|
||||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
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++) {
|
for (i = 0, var_s6_2 = D_demo_800CA0BC; i < ARRAY_COUNT(sp9C); i++, var_s6_2++) {
|
||||||
if ((i != 1) || gGreatFoxIntact) {
|
if ((i != 1) || gGreatFoxIntact) {
|
||||||
sp9C[i] = 0.0f;
|
sp9C[i] = 0.0f;
|
||||||
|
@ -35,13 +35,11 @@ void Display_DrawHelpAlert(void) {
|
|||||||
if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) {
|
if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
|
if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
|
||||||
gTeamHelpActor = NULL;
|
gTeamHelpActor = NULL;
|
||||||
gTeamHelpTimer = 0;
|
gTeamHelpTimer = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gTeamHelpTimer != 0) {
|
if (gTeamHelpTimer != 0) {
|
||||||
gTeamHelpTimer--;
|
gTeamHelpTimer--;
|
||||||
if (gTeamHelpTimer == 0) {
|
if (gTeamHelpTimer == 0) {
|
||||||
@ -262,7 +260,6 @@ void Display_OnFootCharacter(Player* player) {
|
|||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
||||||
Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY);
|
Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY);
|
||||||
|
|
||||||
switch (player->num) {
|
switch (player->num) {
|
||||||
case 0:
|
case 0:
|
||||||
Animation_DrawSkeleton(5, aVsOnFootFoxSkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw,
|
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_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, MTXF_APPLY);
|
||||||
Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
if (gPlayerNum == player->num) {
|
if (gPlayerNum == player->num) {
|
||||||
sp64 = 0.0f;
|
sp64 = 0.0f;
|
||||||
if (gChargeTimers[player->num] >= 20) {
|
if (gChargeTimers[player->num] >= 20) {
|
||||||
@ -343,7 +339,6 @@ f32 sPlayerShadowing = 0.0f;
|
|||||||
|
|
||||||
void Display_LandmasterMuzzleFlash(Player* player) {
|
void Display_LandmasterMuzzleFlash(Player* player) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
|
|
||||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) {
|
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,
|
Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y,
|
||||||
D_display_80161548[player->num].z, MTXF_APPLY);
|
D_display_80161548[player->num].z, MTXF_APPLY);
|
||||||
@ -718,7 +713,6 @@ void Display_Reticle(Player* player) {
|
|||||||
translate = &D_display_801613E0[i];
|
translate = &D_display_801613E0[i];
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY);
|
||||||
|
|
||||||
if (gChargeTimers[player->num] >= 20) {
|
if (gChargeTimers[player->num] >= 20) {
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_63);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_63);
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
@ -844,7 +838,6 @@ void Display_LandmasterEngineGlow_Draw(Player* player) {
|
|||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_RotateZ(gGfxMatrix, player->bankAngle * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, player->bankAngle * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
if (player->form == FORM_LANDMASTER) {
|
if (player->form == FORM_LANDMASTER) {
|
||||||
if (player->unk_194 <= 0.0f) {
|
if (player->unk_194 <= 0.0f) {
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
@ -904,7 +897,6 @@ void Display_BarrelRollShield(Player* player) {
|
|||||||
} else {
|
} else {
|
||||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->baseRollRate < 0) {
|
if (player->baseRollRate < 0) {
|
||||||
Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY);
|
Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||||
}
|
}
|
||||||
@ -948,7 +940,6 @@ void Display_ArwingLaserCharge(Player* player) {
|
|||||||
if (gChargeTimers[player->num] > 10) {
|
if (gChargeTimers[player->num] > 10) {
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
|
||||||
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
|
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
|
||||||
|
|
||||||
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||||
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
|
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
|
||||||
} else {
|
} else {
|
||||||
@ -968,7 +959,6 @@ void Display_ArwingLaserCharge(Player* player) {
|
|||||||
} else {
|
} else {
|
||||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
|
||||||
|
|
||||||
@ -1014,7 +1004,6 @@ void Display_ArwingLaserCharge(Player* player) {
|
|||||||
gSPDisplayList(gMasterDisp++, aOrbDL);
|
gSPDisplayList(gMasterDisp++, aOrbDL);
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gMuzzleFlashScale[player->num] > 0.1f) {
|
if (gMuzzleFlashScale[player->num] > 0.1f) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
|
||||||
@ -1029,7 +1018,6 @@ void Display_ArwingLaserCharge(Player* player) {
|
|||||||
case LASERS_SINGLE:
|
case LASERS_SINGLE:
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128);
|
||||||
gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128);
|
gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128);
|
||||||
|
|
||||||
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||||
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
|
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
|
||||||
} else {
|
} else {
|
||||||
@ -1037,7 +1025,6 @@ void Display_ArwingLaserCharge(Player* player) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
|
|
||||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
|
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
|
||||||
Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f,
|
Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f,
|
||||||
MTXF_APPLY);
|
MTXF_APPLY);
|
||||||
@ -1160,7 +1147,6 @@ void Display_PlayerFeatures(Player* player) {
|
|||||||
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR),
|
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR),
|
||||||
MTXF_APPLY);
|
MTXF_APPLY);
|
||||||
Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY);
|
Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY);
|
||||||
|
|
||||||
var_fv0 = player->unk_194 * 30.0f;
|
var_fv0 = player->unk_194 * 30.0f;
|
||||||
if (var_fv0 > 30.0f) {
|
if (var_fv0 > 30.0f) {
|
||||||
var_fv0 = 30.0f;
|
var_fv0 = 30.0f;
|
||||||
@ -1213,7 +1199,6 @@ void Display_ArwingWingTrail_Draw(Player* player) {
|
|||||||
sp5C = 108.0f;
|
sp5C = 108.0f;
|
||||||
sp58 = -22.0f;
|
sp58 = -22.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->contrailScale != 0.0f) {
|
if (player->contrailScale != 0.0f) {
|
||||||
sp54 = 0.0f;
|
sp54 = 0.0f;
|
||||||
if ((gGameFrameCount % 2) != 0) {
|
if ((gGameFrameCount % 2) != 0) {
|
||||||
@ -1588,7 +1573,6 @@ void Display_LockOnIndicator(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < gCamCount; j++) {
|
for (j = 0; j < gCamCount; j++) {
|
||||||
gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f;
|
gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f;
|
||||||
gLockOnTargetViewPos[j].z = 100.0f;
|
gLockOnTargetViewPos[j].z = 100.0f;
|
||||||
@ -1644,7 +1628,6 @@ void Display_CsLevelCompleteHandleCamera(Player* player) {
|
|||||||
if (sp38 < 0.0f) {
|
if (sp38 < 0.0f) {
|
||||||
sp38 += 360.0f;
|
sp38 += 360.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->rot.y;
|
sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->rot.y;
|
||||||
if (sp3C > 360.0f) {
|
if (sp3C > 360.0f) {
|
||||||
sp3C -= 360.0f;
|
sp3C -= 360.0f;
|
||||||
@ -1692,13 +1675,11 @@ void Display_Update(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
|
|
||||||
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
||||||
Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f);
|
Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f);
|
||||||
} else {
|
} else {
|
||||||
Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f);
|
Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, 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);
|
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.y = camPlayer->cam.at.y;
|
||||||
gPlayCamAt.z = camPlayer->cam.at.z;
|
gPlayCamAt.z = camPlayer->cam.at.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z);
|
camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z);
|
||||||
camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y,
|
camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y,
|
||||||
sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x)));
|
sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x)));
|
||||||
@ -1756,7 +1736,6 @@ void Display_Update(void) {
|
|||||||
tempVec.y = 100.0f;
|
tempVec.y = 100.0f;
|
||||||
tempVec.z = 0.0f;
|
tempVec.z = 0.0f;
|
||||||
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
|
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
|
||||||
|
|
||||||
if (gStarCount != 0) {
|
if (gStarCount != 0) {
|
||||||
gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll);
|
gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll);
|
||||||
Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z);
|
Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z);
|
||||||
@ -1816,7 +1795,6 @@ void Display_Update(void) {
|
|||||||
TexturedLine_Draw();
|
TexturedLine_Draw();
|
||||||
gReflectY = 1;
|
gReflectY = 1;
|
||||||
PlayerShot_DrawAll();
|
PlayerShot_DrawAll();
|
||||||
|
|
||||||
if ((gGroundSurface == SURFACE_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_Push(&gGfxMatrix);
|
||||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||||
@ -1842,7 +1820,6 @@ void Display_Update(void) {
|
|||||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||||
Effect_Draw(0);
|
Effect_Draw(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) {
|
if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) {
|
||||||
D_bg_8015F964 = true;
|
D_bg_8015F964 = true;
|
||||||
Effect_Draw(1);
|
Effect_Draw(1);
|
||||||
|
@ -684,7 +684,6 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
|
|||||||
}
|
}
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OBJ_ACTOR_CUTSCENE:
|
case OBJ_ACTOR_CUTSCENE:
|
||||||
case OBJ_ACTOR_TEAM_BOSS:
|
case OBJ_ACTOR_TEAM_BOSS:
|
||||||
case OBJ_ACTOR_EVENT:
|
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_UPPER:
|
||||||
case OBJ_BOSS_CO_CARRIER_BOTTOM:
|
case OBJ_BOSS_CO_CARRIER_BOTTOM:
|
||||||
COS_DEG(gBosses[index].obj.rot.z);
|
COS_DEG(gBosses[index].obj.rot.z);
|
||||||
|
|
||||||
if (gGroundSurface == SURFACE_WATER) {
|
if (gGroundSurface == SURFACE_WATER) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
|
||||||
} else {
|
} else {
|
||||||
@ -1103,7 +1101,6 @@ void Actor_DrawOnRails(Actor* this) {
|
|||||||
Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]);
|
Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) {
|
if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) {
|
||||||
sp34.y += this->info.targetOffset;
|
sp34.y += this->info.targetOffset;
|
||||||
Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]);
|
Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]);
|
||||||
@ -1124,7 +1121,6 @@ void Actor_DrawAllRange(Actor* this) {
|
|||||||
f32 var_fv1;
|
f32 var_fv1;
|
||||||
|
|
||||||
sDrewActor = false;
|
sDrewActor = false;
|
||||||
|
|
||||||
if (this->info.drawType == 2) {
|
if (this->info.drawType == 2) {
|
||||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
|
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);
|
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_fv0 = 1000.0f;
|
||||||
var_fv1 = -25000.0f;
|
var_fv1 = -25000.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
|
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
|
||||||
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
|
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
|
||||||
if (fabsf(sViewPos.y) < (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_fv1 = -20000.0f;
|
||||||
var_fa1 = 0.5f;
|
var_fa1 = 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
|
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
|
||||||
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
|
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
|
||||||
if (fabsf(sViewPos.y) < (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);
|
Object_SetSfxSourceToView(this->sfxSource, &sViewPos);
|
||||||
this->iwork[24] = sDrewActor;
|
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);
|
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + gPathProgress, MTXF_APPLY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) ||
|
if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) ||
|
||||||
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
|
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
|
||||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY);
|
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.x = pos->x - gLight3x;
|
||||||
sp9C.y = pos->y - gLight3y;
|
sp9C.y = pos->y - gLight3y;
|
||||||
sp9C.z = pos->z - gLight3z;
|
sp9C.z = pos->z - gLight3z;
|
||||||
|
|
||||||
lightDist = VEC3F_MAG(&sp9C);
|
lightDist = VEC3F_MAG(&sp9C);
|
||||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||||
lightFade = 700.0f / lightDist;
|
lightFade = 700.0f / lightDist;
|
||||||
@ -1622,7 +1613,6 @@ void Display_SetSecondLight(Vec3f* pos) {
|
|||||||
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY);
|
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY);
|
||||||
Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY);
|
||||||
|
|
||||||
sp6C.x = 0.0f;
|
sp6C.x = 0.0f;
|
||||||
sp6C.y = 0.0f;
|
sp6C.y = 0.0f;
|
||||||
sp6C.z = -100.0f;
|
sp6C.z = -100.0f;
|
||||||
@ -1698,7 +1688,6 @@ void Object_DrawAll(s32 arg0) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||||
|
|
||||||
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
|
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
|
||||||
if (scenery->obj.status >= OBJ_ACTIVE) {
|
if (scenery->obj.status >= OBJ_ACTIVE) {
|
||||||
if (arg0 > 0) {
|
if (arg0 > 0) {
|
||||||
@ -1720,7 +1709,6 @@ void Object_DrawAll(s32 arg0) {
|
|||||||
RCP_SetupDL_27();
|
RCP_SetupDL_27();
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object_SetCullDirection(arg0);
|
Object_SetCullDirection(arg0);
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Boss_Draw(boss, arg0);
|
Boss_Draw(boss, arg0);
|
||||||
@ -1773,7 +1761,6 @@ void Object_DrawAll(s32 arg0) {
|
|||||||
case LEVELMODE_ON_RAILS:
|
case LEVELMODE_ON_RAILS:
|
||||||
case LEVELMODE_TURRET:
|
case LEVELMODE_TURRET:
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
|
|
||||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
|
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
|
||||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) {
|
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) {
|
||||||
Display_SetSecondLight(&actor->obj.pos);
|
Display_SetSecondLight(&actor->obj.pos);
|
||||||
@ -1874,7 +1861,6 @@ void Effect_DrawAll(s32 arg0) {
|
|||||||
void Object_Draw(s32 arg0) {
|
void Object_Draw(s32 arg0) {
|
||||||
gReflectY = 1;
|
gReflectY = 1;
|
||||||
Object_DrawAll(1);
|
Object_DrawAll(1);
|
||||||
|
|
||||||
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||||
gReflectY = -1;
|
gReflectY = -1;
|
||||||
Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
|
Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
|
||||||
|
@ -562,7 +562,6 @@ void Object_LoadLevelObjects(void) {
|
|||||||
} else {
|
} else {
|
||||||
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
|
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gGroundClipMode == 0) {
|
if (gGroundClipMode == 0) {
|
||||||
for (j = 0; j < gDrawSmallRocks; j++) {
|
for (j = 0; j < gDrawSmallRocks; j++) {
|
||||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
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) {
|
for (i = 0; i < count; i++, hitboxData += 6) {
|
||||||
rotate = 0.0f;
|
rotate = 0.0f;
|
||||||
hitRot.x = hitRot.y = hitRot.z = 0.0f;
|
hitRot.x = hitRot.y = hitRot.z = 0.0f;
|
||||||
|
|
||||||
if (*hitboxData >= HITBOX_SHADOW) {
|
if (*hitboxData >= HITBOX_SHADOW) {
|
||||||
return false;
|
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);
|
Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath - var_fa1, 0.1f, 10.0f, 0.01f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->obj.pos.y > 650.0f) {
|
if (this->obj.pos.y > 650.0f) {
|
||||||
Math_SmoothStepToF(&this->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f);
|
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) {
|
} else if (this->obj.pos.y < -500.0f) {
|
||||||
Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f);
|
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 (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.x - gItems[1].obj.pos.x) < 200.0f) {
|
||||||
if (fabsf(this->obj.pos.z - gItems[1].obj.pos.z) < 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);
|
Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->dmgType != DMG_NONE) {
|
if (this->dmgType != DMG_NONE) {
|
||||||
this->dmgType = DMG_NONE;
|
this->dmgType = DMG_NONE;
|
||||||
this->health -= this->damage;
|
this->health -= this->damage;
|
||||||
@ -2184,7 +2179,6 @@ void func_enmy_80067A40(void) {
|
|||||||
void Item1up_Update(Item1UP* this) {
|
void Item1up_Update(Item1UP* this) {
|
||||||
Item_CheckBounds(this);
|
Item_CheckBounds(this);
|
||||||
Item_SpinPickup(this);
|
Item_SpinPickup(this);
|
||||||
|
|
||||||
if (this->collected) {
|
if (this->collected) {
|
||||||
Object_Kill(&this->obj, this->sfxSource);
|
Object_Kill(&this->obj, this->sfxSource);
|
||||||
Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum);
|
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) {
|
void ItemPickup_Update(Item* this) {
|
||||||
Item_CheckBounds(this);
|
Item_CheckBounds(this);
|
||||||
Item_SpinPickup(this);
|
Item_SpinPickup(this);
|
||||||
|
|
||||||
if (this->state == 0) {
|
if (this->state == 0) {
|
||||||
switch (this->obj.id) {
|
switch (this->obj.id) {
|
||||||
case OBJ_ITEM_BOMB:
|
case OBJ_ITEM_BOMB:
|
||||||
@ -2219,7 +2212,6 @@ void ItemPickup_Update(Item* this) {
|
|||||||
|
|
||||||
case OBJ_ITEM_LASERS:
|
case OBJ_ITEM_LASERS:
|
||||||
this->width = 18.0f;
|
this->width = 18.0f;
|
||||||
|
|
||||||
if (this->collected) {
|
if (this->collected) {
|
||||||
this->timer_4A = 50;
|
this->timer_4A = 50;
|
||||||
this->state = 1;
|
this->state = 1;
|
||||||
@ -2238,7 +2230,6 @@ void ItemPickup_Update(Item* this) {
|
|||||||
} else {
|
} else {
|
||||||
gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60;
|
gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
gRightWingFlashTimer[this->playerNum] = 1030;
|
gRightWingFlashTimer[this->playerNum] = 1030;
|
||||||
gLeftWingFlashTimer[this->playerNum] = 1030;
|
gLeftWingFlashTimer[this->playerNum] = 1030;
|
||||||
}
|
}
|
||||||
@ -2246,7 +2237,6 @@ void ItemPickup_Update(Item* this) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Math_SmoothStepToF(&this->width, 2.5f, 1.0f, 0.5f, 0.0f);
|
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;
|
this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f;
|
||||||
|
|
||||||
if (gPlayer[this->playerNum].form == FORM_LANDMASTER) {
|
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);
|
Math_SmoothStepToF(&this->width, 0.4f, 1.0f, 0.05f, 0.0f);
|
||||||
Item_CheckBounds(this);
|
Item_CheckBounds(this);
|
||||||
Item_SpinPickup(this);
|
Item_SpinPickup(this);
|
||||||
|
|
||||||
if (this->collected) {
|
if (this->collected) {
|
||||||
this->state = 1;
|
this->state = 1;
|
||||||
this->timer_48 = 50;
|
this->timer_48 = 50;
|
||||||
@ -2332,7 +2321,6 @@ void ItemSupplyRing_Update(Item* this) {
|
|||||||
} else {
|
} else {
|
||||||
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f;
|
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||||
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f;
|
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f;
|
||||||
} else {
|
} else {
|
||||||
@ -2340,7 +2328,6 @@ void ItemSupplyRing_Update(Item* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->obj.rot.z += 22.0f;
|
this->obj.rot.z += 22.0f;
|
||||||
|
|
||||||
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f,
|
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f,
|
||||||
0.0f);
|
0.0f);
|
||||||
if (this->timer_48 == 0) {
|
if (this->timer_48 == 0) {
|
||||||
@ -2372,7 +2359,6 @@ void ItemGoldRing_Update(ItemGoldRing* this) {
|
|||||||
void ItemWingRepair_Update(ItemWingRepair* this) {
|
void ItemWingRepair_Update(ItemWingRepair* this) {
|
||||||
Item_CheckBounds(this);
|
Item_CheckBounds(this);
|
||||||
Item_SpinPickup(this);
|
Item_SpinPickup(this);
|
||||||
|
|
||||||
if (this->collected) {
|
if (this->collected) {
|
||||||
func_enmy_80067A40();
|
func_enmy_80067A40();
|
||||||
Object_Kill(&this->obj, this->sfxSource);
|
Object_Kill(&this->obj, this->sfxSource);
|
||||||
@ -2385,7 +2371,6 @@ void ItemWingRepair_Update(ItemWingRepair* this) {
|
|||||||
|
|
||||||
void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
|
void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
|
||||||
Item_CheckBounds(this);
|
Item_CheckBounds(this);
|
||||||
|
|
||||||
if (this->state > 0) {
|
if (this->state > 0) {
|
||||||
if (this->state == 1) {
|
if (this->state == 1) {
|
||||||
this->obj.rot.z -= 10.0f;
|
this->obj.rot.z -= 10.0f;
|
||||||
@ -2404,7 +2389,6 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this->width = 100.0f;
|
this->width = 100.0f;
|
||||||
|
|
||||||
if (gRingPassCount < 0) {
|
if (gRingPassCount < 0) {
|
||||||
this->state = 2;
|
this->state = 2;
|
||||||
this->unk_44 = 255;
|
this->unk_44 = 255;
|
||||||
@ -2491,7 +2475,6 @@ void ItemRingCheck_Update(Item* this) {
|
|||||||
|
|
||||||
void ItemPathChange_Update(Item* this) {
|
void ItemPathChange_Update(Item* this) {
|
||||||
gLastPathChange = this->obj.id;
|
gLastPathChange = this->obj.id;
|
||||||
|
|
||||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
|
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
|
||||||
Object_Kill(&this->obj, this->sfxSource);
|
Object_Kill(&this->obj, this->sfxSource);
|
||||||
} else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) {
|
} 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)) {
|
if (((this->posAA.z + gPathProgress) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) {
|
||||||
this->mode = 0;
|
this->mode = 0;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,6 @@ void MeHopBot_Update(MeHopBot* this) {
|
|||||||
|
|
||||||
this->obj.rot.y = Math_RadToDeg(
|
this->obj.rot.y = Math_RadToDeg(
|
||||||
Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].trueZpos - this->obj.pos.z));
|
Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].trueZpos - this->obj.pos.z));
|
||||||
|
|
||||||
if (this->obj.pos.y < -500.0f) {
|
if (this->obj.pos.y < -500.0f) {
|
||||||
this->obj.pos.y = -500.0f;
|
this->obj.pos.y = -500.0f;
|
||||||
this->vel.y = 0.0f;
|
this->vel.y = 0.0f;
|
||||||
@ -457,7 +456,6 @@ void CoMoleMissile_Update(CoMoleMissile* this) {
|
|||||||
if (this->vel.y < 12.0f) {
|
if (this->vel.y < 12.0f) {
|
||||||
Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f);
|
Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->obj.pos.y < (gGroundHeight + 10.0f)) {
|
if (this->obj.pos.y < (gGroundHeight + 10.0f)) {
|
||||||
this->obj.pos.y = gGroundHeight;
|
this->obj.pos.y = gGroundHeight;
|
||||||
this->state = 4;
|
this->state = 4;
|
||||||
|
@ -114,7 +114,6 @@ void Game_SetGameState(void) {
|
|||||||
gSceneSetup = 0;
|
gSceneSetup = 0;
|
||||||
gFillScreenColor = gBgColor = 0;
|
gFillScreenColor = gBgColor = 0;
|
||||||
gPathProgress = 0.0f;
|
gPathProgress = 0.0f;
|
||||||
|
|
||||||
if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) {
|
if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) {
|
||||||
gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248
|
gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248
|
||||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
|
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
|
||||||
@ -343,7 +342,6 @@ void Game_Update(void) {
|
|||||||
u8 soundMode;
|
u8 soundMode;
|
||||||
|
|
||||||
Game_SetGameState();
|
Game_SetGameState();
|
||||||
|
|
||||||
if (gGameStandby) {
|
if (gGameStandby) {
|
||||||
Game_InitStandbyDL(&gUnkDisp1);
|
Game_InitStandbyDL(&gUnkDisp1);
|
||||||
gGameStandby = false;
|
gGameStandby = false;
|
||||||
@ -440,14 +438,12 @@ void Game_Update(void) {
|
|||||||
gVersusStage = 0;
|
gVersusStage = 0;
|
||||||
gVsPointsToWin = 3;
|
gVsPointsToWin = 3;
|
||||||
gBlurAlpha = 255;
|
gBlurAlpha = 255;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gLeveLClearStatus); i++) {
|
for (i = 0; i < ARRAY_COUNT(gLeveLClearStatus); i++) {
|
||||||
gLeveLClearStatus[i] = 0;
|
gLeveLClearStatus[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gExpertMode = false;
|
gExpertMode = false;
|
||||||
gOptionSoundMode = gSaveFile.save.data.soundMode;
|
gOptionSoundMode = gSaveFile.save.data.soundMode;
|
||||||
|
|
||||||
switch (gOptionSoundMode) {
|
switch (gOptionSoundMode) {
|
||||||
case OPTIONSOUND_STEREO:
|
case OPTIONSOUND_STEREO:
|
||||||
soundMode = SOUNDMODE_STEREO;
|
soundMode = SOUNDMODE_STEREO;
|
||||||
@ -463,12 +459,10 @@ void Game_Update(void) {
|
|||||||
soundMode = SOUNDMODE_STEREO;
|
soundMode = SOUNDMODE_STEREO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SEQCMD_SET_SOUND_MODE(soundMode);
|
SEQCMD_SET_SOUND_MODE(soundMode);
|
||||||
gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume;
|
gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume;
|
||||||
gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume;
|
gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume;
|
||||||
gVolumeSettings[AUDIO_TYPE_SFX] = gSaveFile.save.data.sfxVolume;
|
gVolumeSettings[AUDIO_TYPE_SFX] = gSaveFile.save.data.sfxVolume;
|
||||||
|
|
||||||
if (gVolumeSettings[AUDIO_TYPE_MUSIC] > 99) {
|
if (gVolumeSettings[AUDIO_TYPE_MUSIC] > 99) {
|
||||||
gVolumeSettings[AUDIO_TYPE_MUSIC] = 99;
|
gVolumeSettings[AUDIO_TYPE_MUSIC] = 99;
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,6 @@ void HUD_TeamDownWrench_Draw(s32 arg0) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_36);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_36);
|
||||||
|
|
||||||
if (arg0 == 0) {
|
if (arg0 == 0) {
|
||||||
for (i = 1; i < 4; i++) {
|
for (i = 1; i < 4; i++) {
|
||||||
if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
||||||
@ -2947,7 +2946,6 @@ void HUD_BoostGauge_Draw(f32 xPos, f32 yPos) {
|
|||||||
HUD_BoostGaugeOverheat_Draw(boostGaugeXpos[playerNum] + temp + 1.0f, boostGaugeYpos[playerNum] + sp60, temp_fs0,
|
HUD_BoostGaugeOverheat_Draw(boostGaugeXpos[playerNum] + temp + 1.0f, boostGaugeYpos[playerNum] + sp60, temp_fs0,
|
||||||
1.0f);
|
1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
|
||||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||||
HUD_BoostGaugeFrame_Draw(boostGaugeXpos[playerNum], boostGaugeYpos[playerNum], 1.0f, 1.0f);
|
HUD_BoostGaugeFrame_Draw(boostGaugeXpos[playerNum], boostGaugeYpos[playerNum], 1.0f, 1.0f);
|
||||||
@ -3098,8 +3096,8 @@ void HUD_DrawBossHealth(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (D_801616C4 >= 0.88f) {
|
if (D_801616C4 >= 0.88f) {
|
||||||
temp6 = sp3C + 9.0f;
|
temp6 = sp3C + 8.0f;
|
||||||
temp7 = 101.0f - (31.884058f * D_801616C8) + temp1;
|
temp7 = 101.0f - ((2200.0f / 69.0f) * D_801616C8) + temp1;
|
||||||
if (D_801616C8 > 0.0f) {
|
if (D_801616C8 > 0.0f) {
|
||||||
Lib_TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8);
|
Lib_TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8);
|
||||||
}
|
}
|
||||||
@ -3277,7 +3275,6 @@ void HUD_Hitpoints_Update(f32 xPos, f32 yPos) {
|
|||||||
b = 200;
|
b = 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
|
||||||
gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255);
|
gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255);
|
||||||
HUD_Hitpoints_Draw(xPos, yPos);
|
HUD_Hitpoints_Draw(xPos, yPos);
|
||||||
|
@ -26,61 +26,62 @@ Scene sCurrentScene = {
|
|||||||
|
|
||||||
void Load_RomFile(void* vRomAddress, void* dest, ptrdiff_t size) {
|
void Load_RomFile(void* vRomAddress, void* dest, ptrdiff_t size) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
Lib_FillScreen(true);
|
Lib_FillScreen(true);
|
||||||
sFillTimer = 3;
|
sFillTimer = 3;
|
||||||
gGameStandby = true;
|
gGameStandby = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 Load_SceneFiles(Scene* scene) {
|
u8 Load_SceneFiles(Scene* scene) {
|
||||||
|
|
||||||
sCurrentScene = *scene;
|
sCurrentScene = *scene;
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
u8* ramPtr = SEGMENT_VRAM_START(ovl_i1);
|
||||||
|
u8 segment;
|
||||||
|
u8 changeScene = false;
|
||||||
|
|
||||||
// u8* ramPtr = SEGMENT_VRAM_START(ovl_i1);
|
if (scene->ovl.rom.start == (0, sCurrentScene.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array
|
||||||
// u8 segment;
|
ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom);
|
||||||
// u8 changeOvl = false;
|
ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss);
|
||||||
|
} else {
|
||||||
|
sCurrentScene.ovl.rom.start = scene->ovl.rom.start;
|
||||||
|
sCurrentScene.ovl.rom.end = ramPtr;
|
||||||
|
if (scene->ovl.rom.start != 0) {
|
||||||
|
changeScene = true;
|
||||||
|
Load_RomFile(scene->ovl.rom.start, ramPtr, SEGMENT_SIZE(scene->ovl.rom));
|
||||||
|
ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom);
|
||||||
|
bzero(scene->ovl.bss.start, SEGMENT_SIZE(scene->ovl.bss));
|
||||||
|
ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
segment = 0;
|
||||||
|
while ((segment < 15) && (scene->assets[segment].start == sCurrentScene.assets[segment].start) &&
|
||||||
|
(changeScene == false)) {
|
||||||
|
if (scene->assets[segment].start != 0) {
|
||||||
|
gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
|
||||||
|
gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
|
||||||
|
ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]);
|
||||||
|
}
|
||||||
|
segment += 1; // can't be ++
|
||||||
|
}
|
||||||
|
for (segment; segment < 15; segment += 1) {
|
||||||
|
sCurrentScene.assets[segment].start = scene->assets[segment].start;
|
||||||
|
sCurrentScene.assets[segment].end = ramPtr;
|
||||||
|
if (scene->assets[segment].start != 0) {
|
||||||
|
gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
|
||||||
|
gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
|
||||||
|
Load_RomFile(scene->assets[segment].start, ramPtr, SEGMENT_SIZE(scene->assets[segment]));
|
||||||
|
ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if (ovlInit->ovl.rom.start == (0, sCurrentOverlay.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array
|
if (sFillTimer != 0) {
|
||||||
// ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom);
|
sFillTimer--;
|
||||||
// ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss);
|
} else if (gStartNMI == 0) {
|
||||||
// } else {
|
Lib_FillScreen(false);
|
||||||
// sCurrentOverlay.ovl.rom.start = ovlInit->ovl.rom.start;
|
}
|
||||||
// sCurrentOverlay.ovl.rom.end = ramPtr;
|
return changeScene;
|
||||||
// if (ovlInit->ovl.rom.start != 0) {
|
#endif
|
||||||
// changeOvl = true;
|
|
||||||
// Overlay_LoadSegment(ovlInit->ovl.rom.start, ramPtr, SEGMENT_SIZE(ovlInit->ovl.rom));
|
|
||||||
// ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom);
|
|
||||||
// bzero(ovlInit->ovl.bss.start, SEGMENT_SIZE(ovlInit->ovl.bss));
|
|
||||||
// ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// segment = 0;
|
|
||||||
// while ((segment < 15) && (ovlInit->assets[segment].start == sCurrentOverlay.assets[segment].start) &&
|
|
||||||
// changeOvl == 0) {
|
|
||||||
// if (ovlInit->assets[segment].start != 0) {
|
|
||||||
// gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
|
|
||||||
// gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
|
|
||||||
// ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]);
|
|
||||||
// }
|
|
||||||
// segment += 1;
|
|
||||||
// }
|
|
||||||
// for (segment; segment < 15; segment += 1) {
|
|
||||||
// sCurrentOverlay.assets[segment].start = ovlInit->assets[segment].start;
|
|
||||||
// sCurrentOverlay.assets[segment].end = ramPtr;
|
|
||||||
// if (ovlInit->assets[segment].start != 0) {
|
|
||||||
// gSegments[segment + 1] = K0_TO_PHYS(ramPtr);
|
|
||||||
// gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
|
|
||||||
// Overlay_LoadSegment(ovlInit->assets[segment].start, ramPtr, SEGMENT_SIZE(ovlInit->assets[segment]));
|
|
||||||
// ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (sFillTimer != 0) {
|
|
||||||
// sFillTimer--;
|
|
||||||
// } else if (gStartNMI == 0) {
|
|
||||||
// Lib_FillScreen(false);
|
|
||||||
// }
|
|
||||||
// return changeOvl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) {
|
u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) {
|
||||||
|
@ -68,8 +68,8 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len)
|
|||||||
s32 yChar = yPos;
|
s32 yChar = yPos;
|
||||||
s32 i;
|
s32 i;
|
||||||
bool print;
|
bool print;
|
||||||
msgPtr = LOAD_ASSET(msgPtr);
|
|
||||||
|
|
||||||
|
msgPtr = LOAD_ASSET(msgPtr);
|
||||||
gDPSetPrimColor((*gfxPtr)++, 0x00, 0x00, 255, 255, 255, 255);
|
gDPSetPrimColor((*gfxPtr)++, 0x00, 0x00, 255, 255, 255, 255);
|
||||||
gDPSetTextureLUT((*gfxPtr)++, G_TT_RGBA16);
|
gDPSetTextureLUT((*gfxPtr)++, G_TT_RGBA16);
|
||||||
gDPLoadTLUT((*gfxPtr)++, 64, 256, gTextCharPalettes);
|
gDPLoadTLUT((*gfxPtr)++, 64, 256, gTextCharPalettes);
|
||||||
|
@ -86,7 +86,6 @@ void Play_UpdateDynaFloor(void) {
|
|||||||
f32 sp84;
|
f32 sp84;
|
||||||
|
|
||||||
gDynaFloorTimer++;
|
gDynaFloorTimer++;
|
||||||
|
|
||||||
switch (gCurrentLevel) {
|
switch (gCurrentLevel) {
|
||||||
case LEVEL_SOLAR:
|
case LEVEL_SOLAR:
|
||||||
if ((gGameFrameCount % 2) != 0) {
|
if ((gGameFrameCount % 2) != 0) {
|
||||||
@ -126,7 +125,6 @@ void Play_UpdateDynaFloor(void) {
|
|||||||
for (i = 0; i < 17 * 17; i++, var_s3++, var_s5++, var_s4++, var_s0++, var_s1++, spB0++) {
|
for (i = 0; i < 17 * 17; i++, var_s3++, var_s5++, var_s4++, var_s0++, var_s1++, spB0++) {
|
||||||
Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f);
|
Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f);
|
||||||
Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f);
|
Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f);
|
||||||
|
|
||||||
if ((gDynaFloorTimer & spA8) == (i & spA8)) {
|
if ((gDynaFloorTimer & spA8) == (i & spA8)) {
|
||||||
*var_s5 = RAND_FLOAT(sp90);
|
*var_s5 = RAND_FLOAT(sp90);
|
||||||
*var_s4 = 0.0f;
|
*var_s4 = 0.0f;
|
||||||
@ -219,7 +217,6 @@ void Player_DamageEffects(Player* player) {
|
|||||||
if (player->shields > 48) {
|
if (player->shields > 48) {
|
||||||
var_v1 = 64 - 1;
|
var_v1 = 64 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
|
if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
|
||||||
sp40 = 0.0f;
|
sp40 = 0.0f;
|
||||||
if (player->form == FORM_LANDMASTER) {
|
if (player->form == FORM_LANDMASTER) {
|
||||||
@ -569,7 +566,6 @@ void Play_GenerateStarfield(void) {
|
|||||||
MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000);
|
MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000);
|
||||||
MEM_ARRAY_ALLOCATE(gStarOffsetsY, 1000);
|
MEM_ARRAY_ALLOCATE(gStarOffsetsY, 1000);
|
||||||
MEM_ARRAY_ALLOCATE(gStarFillColors, 1000);
|
MEM_ARRAY_ALLOCATE(gStarFillColors, 1000);
|
||||||
|
|
||||||
Rand_SetSeed(1, 29000, 9876);
|
Rand_SetSeed(1, 29000, 9876);
|
||||||
|
|
||||||
for (i = 0; i < 1000; i++) {
|
for (i = 0; i < 1000; i++) {
|
||||||
@ -583,7 +579,6 @@ void Play_SetupStarfield(void) {
|
|||||||
Play_GenerateStarfield();
|
Play_GenerateStarfield();
|
||||||
gGroundHeight = -25000.0f;
|
gGroundHeight = -25000.0f;
|
||||||
gStarCount = 600;
|
gStarCount = 600;
|
||||||
|
|
||||||
if (gCurrentLevel == LEVEL_AREA_6) {
|
if (gCurrentLevel == LEVEL_AREA_6) {
|
||||||
gStarCount = 300;
|
gStarCount = 300;
|
||||||
}
|
}
|
||||||
@ -692,7 +687,6 @@ void Play_ClearObjectData(void) {
|
|||||||
Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource);
|
Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource);
|
||||||
PlayerShot_Initialize(&gPlayerShots[i]);
|
PlayerShot_Initialize(&gPlayerShots[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors =
|
gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors =
|
||||||
gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
|
gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
|
||||||
gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y =
|
gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y =
|
||||||
@ -726,7 +720,6 @@ void Play_UpdateFillScreen(void) {
|
|||||||
|
|
||||||
gFillScreenAlphaStep = 16;
|
gFillScreenAlphaStep = 16;
|
||||||
Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f);
|
Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f);
|
||||||
|
|
||||||
if (gScreenFlashTimer != 0) {
|
if (gScreenFlashTimer != 0) {
|
||||||
gScreenFlashTimer--;
|
gScreenFlashTimer--;
|
||||||
if ((gScreenFlashTimer & 2) != 0) {
|
if ((gScreenFlashTimer & 2) != 0) {
|
||||||
@ -891,7 +884,6 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
|
|||||||
} else {
|
} else {
|
||||||
player->mercyTimer = 20;
|
player->mercyTimer = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gHasShield[player->num]) {
|
if (gHasShield[player->num]) {
|
||||||
Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num);
|
Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num);
|
||||||
gShieldTimer[player->num] = 5;
|
gShieldTimer[player->num] = 5;
|
||||||
@ -975,7 +967,6 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
|
|||||||
player->knockback.x = sp38.x;
|
player->knockback.x = sp38.x;
|
||||||
player->knockback.y = sp38.y;
|
player->knockback.y = sp38.y;
|
||||||
player->knockback.z = sp38.z;
|
player->knockback.z = sp38.z;
|
||||||
|
|
||||||
if (Rand_ZeroOne() < 0.5f) {
|
if (Rand_ZeroOne() < 0.5f) {
|
||||||
Player_DamageWings(player, 1, 15);
|
Player_DamageWings(player, 1, 15);
|
||||||
} else {
|
} else {
|
||||||
@ -1193,7 +1184,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
|
|||||||
var_fv1 = sp88.y + yPos;
|
var_fv1 = sp88.y + yPos;
|
||||||
var_fa0 = sp88.z + zPos;
|
var_fa0 = sp88.z + zPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
||||||
*index = i + 1;
|
*index = i + 1;
|
||||||
if (hitboxData[-1] == HITBOX_SHADOW) {
|
if (hitboxData[-1] == HITBOX_SHADOW) {
|
||||||
@ -1219,7 +1209,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
|
|||||||
var_fv1 = sp88.y + yPos;
|
var_fv1 = sp88.y + yPos;
|
||||||
var_fa0 = sp88.z + zPos;
|
var_fa0 = sp88.z + zPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
||||||
*index = i + 1;
|
*index = i + 1;
|
||||||
return 4;
|
return 4;
|
||||||
@ -1238,7 +1227,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
|
|||||||
var_fv1 = sp88.y + yPos;
|
var_fv1 = sp88.y + yPos;
|
||||||
var_fa0 = sp88.z + zPos;
|
var_fa0 = sp88.z + zPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
||||||
*index = i + 1;
|
*index = i + 1;
|
||||||
return 1;
|
return 1;
|
||||||
@ -1257,7 +1245,6 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32
|
|||||||
var_fv1 = sp88.y + yPos;
|
var_fv1 = sp88.y + yPos;
|
||||||
var_fa0 = sp88.z + zPos;
|
var_fa0 = sp88.z + zPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) {
|
||||||
*index = i + 1;
|
*index = i + 1;
|
||||||
return 2;
|
return 2;
|
||||||
@ -1732,7 +1719,6 @@ void Player_CollisionCheck(Player* player) {
|
|||||||
if ((gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) {
|
if ((gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) {
|
||||||
sp8C = 4000.0f;
|
sp8C = 4000.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
|
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
|
||||||
if (scenery360->obj.status == OBJ_ACTIVE) {
|
if (scenery360->obj.status == OBJ_ACTIVE) {
|
||||||
spC8.x = scenery360->obj.pos.x - player->pos.x;
|
spC8.x = scenery360->obj.pos.x - player->pos.x;
|
||||||
@ -2174,7 +2160,6 @@ void Player_CollisionCheck(Player* player) {
|
|||||||
spC8.y = 7.0f;
|
spC8.y = 7.0f;
|
||||||
}
|
}
|
||||||
spBC.y = spC8.x + spC8.y;
|
spBC.y = spC8.x + spC8.y;
|
||||||
|
|
||||||
if ((fabsf(opponent->trueZpos - player->trueZpos) <= spBC.z) &&
|
if ((fabsf(opponent->trueZpos - player->trueZpos) <= spBC.z) &&
|
||||||
(fabsf(opponent->pos.y - player->pos.y) <= spBC.y) &&
|
(fabsf(opponent->pos.y - player->pos.y) <= spBC.y) &&
|
||||||
(fabsf(opponent->pos.x - player->pos.x) <= spBC.x)) {
|
(fabsf(opponent->pos.x - player->pos.x) <= spBC.x)) {
|
||||||
@ -2198,7 +2183,6 @@ void Player_CollisionCheck(Player* player) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gUseDynaFloor) {
|
if (gUseDynaFloor) {
|
||||||
if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) {
|
if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) {
|
||||||
if (gCurrentLevel == LEVEL_ZONESS) {
|
if (gCurrentLevel == LEVEL_ZONESS) {
|
||||||
@ -2231,7 +2215,6 @@ void Player_CollisionCheck(Player* player) {
|
|||||||
player->knockback.y = 30.0f;
|
player->knockback.y = 30.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f),
|
if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f),
|
||||||
player->pos.y + (player->hit2.y - player->pos.y) * 1.5f, player->hit2.z)) {
|
player->pos.y + (player->hit2.y - player->pos.y) * 1.5f, player->hit2.z)) {
|
||||||
if (gCurrentLevel == LEVEL_ZONESS) {
|
if (gCurrentLevel == LEVEL_ZONESS) {
|
||||||
@ -2681,7 +2664,6 @@ void Player_InitVersus(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
Player_ResetVsData();
|
Player_ResetVsData();
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
gPlayerNum = i;
|
gPlayerNum = i;
|
||||||
Player_Initialize(&gPlayer[i]);
|
Player_Initialize(&gPlayer[i]);
|
||||||
@ -2696,7 +2678,6 @@ void Play_Init(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gArwingSpeed = 40.0f;
|
gArwingSpeed = 40.0f;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gControllerRumbleEnabled); i++) {
|
for (i = 0; i < ARRAY_COUNT(gControllerRumbleEnabled); i++) {
|
||||||
gControllerRumbleEnabled[i] = 0;
|
gControllerRumbleEnabled[i] = 0;
|
||||||
}
|
}
|
||||||
@ -2734,7 +2715,6 @@ void Play_Init(void) {
|
|||||||
gLevelMode = LEVELMODE_ON_RAILS;
|
gLevelMode = LEVELMODE_ON_RAILS;
|
||||||
gPathTexScroll = D_bg_8015F968 = 0.0f;
|
gPathTexScroll = D_bg_8015F968 = 0.0f;
|
||||||
D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false;
|
D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false;
|
||||||
|
|
||||||
if (gCurrentLevel >= LEVEL_FORTUNA) {
|
if (gCurrentLevel >= LEVEL_FORTUNA) {
|
||||||
gLevelMode = LEVELMODE_ALL_RANGE;
|
gLevelMode = LEVELMODE_ALL_RANGE;
|
||||||
if (gCurrentLevel == LEVEL_VERSUS) {
|
if (gCurrentLevel == LEVEL_VERSUS) {
|
||||||
@ -2798,7 +2778,6 @@ void Play_Init(void) {
|
|||||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||||
gWaterLevel = 1000.0f;
|
gWaterLevel = 1000.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
gLoadLevelObjects = false;
|
gLoadLevelObjects = false;
|
||||||
gCamCount = 1;
|
gCamCount = 1;
|
||||||
|
|
||||||
@ -2812,7 +2791,6 @@ void Play_Init(void) {
|
|||||||
|
|
||||||
MEM_ARRAY_ALLOCATE(gPlayer, gCamCount);
|
MEM_ARRAY_ALLOCATE(gPlayer, gCamCount);
|
||||||
Player_InitializeAll();
|
Player_InitializeAll();
|
||||||
|
|
||||||
for (i = 0; i < gCamCount; i++) {
|
for (i = 0; i < gCamCount; i++) {
|
||||||
gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT;
|
gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT;
|
||||||
gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0;
|
gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0;
|
||||||
@ -2822,7 +2800,6 @@ void Play_Init(void) {
|
|||||||
|
|
||||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||||
MEM_ARRAY_ALLOCATE(gScenery360, 200);
|
MEM_ARRAY_ALLOCATE(gScenery360, 200);
|
||||||
|
|
||||||
for (i = 0; i < 200; i++) {
|
for (i = 0; i < 200; i++) {
|
||||||
gScenery360[i].obj.status = OBJ_FREE;
|
gScenery360[i].obj.status = OBJ_FREE;
|
||||||
}
|
}
|
||||||
@ -2900,7 +2877,6 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3
|
|||||||
sp44.x = 0.0f;
|
sp44.x = 0.0f;
|
||||||
sp44.y = 0.0f;
|
sp44.y = 0.0f;
|
||||||
sp44.z = speed;
|
sp44.z = speed;
|
||||||
|
|
||||||
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
|
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
|
||||||
|
|
||||||
sp44.x = arg2;
|
sp44.x = arg2;
|
||||||
@ -2908,7 +2884,6 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3
|
|||||||
sp44.z = 0.0f;
|
sp44.z = 0.0f;
|
||||||
|
|
||||||
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp2C);
|
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp2C);
|
||||||
|
|
||||||
shot->obj.status = SHOT_ACTIVE;
|
shot->obj.status = SHOT_ACTIVE;
|
||||||
shot->vel.x = sp38.x;
|
shot->vel.x = sp38.x;
|
||||||
shot->vel.y = sp38.y;
|
shot->vel.y = sp38.y;
|
||||||
@ -2921,7 +2896,6 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3
|
|||||||
} else {
|
} else {
|
||||||
shot->timer = 37;
|
shot->timer = 37;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) {
|
if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) {
|
||||||
shot->obj.pos.x = player->pos.x + sp2C.x;
|
shot->obj.pos.x = player->pos.x + sp2C.x;
|
||||||
shot->obj.pos.y = player->pos.y + sp2C.y;
|
shot->obj.pos.y = player->pos.y + sp2C.y;
|
||||||
@ -3089,7 +3063,6 @@ void Player_SmartBomb(Player* player) {
|
|||||||
|
|
||||||
gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f;
|
gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f;
|
||||||
gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0;
|
gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0;
|
||||||
|
|
||||||
Audio_InitBombSfx(player->num, 1);
|
Audio_InitBombSfx(player->num, 1);
|
||||||
Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource);
|
Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource);
|
||||||
}
|
}
|
||||||
@ -3101,7 +3074,6 @@ void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotI
|
|||||||
Vec3f sp44;
|
Vec3f sp44;
|
||||||
|
|
||||||
PlayerShot_Initialize(shot);
|
PlayerShot_Initialize(shot);
|
||||||
|
|
||||||
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW);
|
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW);
|
||||||
Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY);
|
||||||
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY);
|
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY);
|
||||||
@ -3123,7 +3095,6 @@ void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotI
|
|||||||
Matrix_Translate(gCalcMatrix, 0.0f, player->yBob, 0, MTXF_APPLY);
|
Matrix_Translate(gCalcMatrix, 0.0f, player->yBob, 0, MTXF_APPLY);
|
||||||
Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, MTXF_APPLY);
|
Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, MTXF_APPLY);
|
||||||
Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
sp5C.x = 0.0f;
|
sp5C.x = 0.0f;
|
||||||
sp5C.y = 0.0f;
|
sp5C.y = 0.0f;
|
||||||
sp5C.z = 0;
|
sp5C.z = 0;
|
||||||
@ -3196,7 +3167,6 @@ bool Player_UpdateLockOn(Player* player) {
|
|||||||
if (gChargeTimers[player->num] == 20) {
|
if (gChargeTimers[player->num] == 20) {
|
||||||
Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_SEARCH, player->num);
|
Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_SEARCH, player->num);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG) && (player->form == FORM_ARWING) &&
|
if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG) && (player->form == FORM_ARWING) &&
|
||||||
(player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) &&
|
(player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) &&
|
||||||
((gGameFrameCount % 4) == 0) && Player_CanLockOn(player->num)) {
|
((gGameFrameCount % 4) == 0) && Player_CanLockOn(player->num)) {
|
||||||
@ -3263,7 +3233,6 @@ bool Player_UpdateLockOn(Player* player) {
|
|||||||
|
|
||||||
if (gInputPress->button & B_BUTTON) {
|
if (gInputPress->button & B_BUTTON) {
|
||||||
hasBombTarget = false;
|
hasBombTarget = false;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
|
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
|
||||||
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) {
|
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) {
|
||||||
hasBombTarget = true;
|
hasBombTarget = true;
|
||||||
@ -3277,7 +3246,6 @@ bool Player_UpdateLockOn(Player* player) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasBombTarget && (gBombCount[player->num] != 0) &&
|
if (hasBombTarget && (gBombCount[player->num] != 0) &&
|
||||||
(gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == SHOT_FREE)) {
|
(gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == SHOT_FREE)) {
|
||||||
gBombCount[player->num]--;
|
gBombCount[player->num]--;
|
||||||
@ -3304,7 +3272,6 @@ void Player_Shoot(Player* player) {
|
|||||||
(player->arwing.leftWingState <= WINGSTATE_BROKEN)) {
|
(player->arwing.leftWingState <= WINGSTATE_BROKEN)) {
|
||||||
gLaserStrength[player->num] = LASERS_SINGLE;
|
gLaserStrength[player->num] = LASERS_SINGLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Player_UpdateLockOn(player)) {
|
if (!Player_UpdateLockOn(player)) {
|
||||||
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
|
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
|
||||||
Math_SmoothStepToF(&player->arwing.laserGunsYpos, -10.0f, 1.0f, 0.5f, 0.0f);
|
Math_SmoothStepToF(&player->arwing.laserGunsYpos, -10.0f, 1.0f, 0.5f, 0.0f);
|
||||||
@ -3480,7 +3447,6 @@ void Player_UpdatePath(Player* player) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (player->bankAngle < -360.0f) {
|
if (player->bankAngle < -360.0f) {
|
||||||
player->bankAngle += 360.0f;
|
player->bankAngle += 360.0f;
|
||||||
@ -3498,7 +3464,6 @@ void Player_UpdatePath(Player* player) {
|
|||||||
gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f);
|
gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f);
|
||||||
gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f);
|
gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->pathChangeTimer != 0) {
|
if (player->pathChangeTimer != 0) {
|
||||||
player->pathChangeTimer--;
|
player->pathChangeTimer--;
|
||||||
Math_SmoothStepToF(&player->yRot_114, player->pathChangeYaw, 0.03f, 0.5f, 0.0001f);
|
Math_SmoothStepToF(&player->yRot_114, player->pathChangeYaw, 0.03f, 0.5f, 0.0001f);
|
||||||
@ -3614,7 +3579,6 @@ void Player_MoveArwing360(Player* player) {
|
|||||||
gPlayerTurnRate *= 2.0f;
|
gPlayerTurnRate *= 2.0f;
|
||||||
scale = 0.2f;
|
scale = 0.2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((player->zRotBank < -10.0f) && (sp7C < 0)) {
|
if ((player->zRotBank < -10.0f) && (sp7C < 0)) {
|
||||||
gPlayerTurnRate *= 2.0f;
|
gPlayerTurnRate *= 2.0f;
|
||||||
scale = 0.2f;
|
scale = 0.2f;
|
||||||
@ -3686,7 +3650,6 @@ void Player_MoveArwing360(Player* player) {
|
|||||||
sp4C.y -= 2.5f;
|
sp4C.y -= 2.5f;
|
||||||
}
|
}
|
||||||
sp4C.z = player->baseSpeed + player->boostSpeed;
|
sp4C.z = player->baseSpeed + player->boostSpeed;
|
||||||
|
|
||||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40);
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40);
|
||||||
|
|
||||||
player->vel.x = sp40.x;
|
player->vel.x = sp40.x;
|
||||||
@ -3755,14 +3718,12 @@ void Player_PerformLoop(Player* player) {
|
|||||||
} else {
|
} else {
|
||||||
player->boostMeter += 1.0f;
|
player->boostMeter += 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->boostMeter > 90.0f) {
|
if (player->boostMeter > 90.0f) {
|
||||||
player->boostMeter = 90.0f;
|
player->boostMeter = 90.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->unk_190 = 2;
|
player->unk_190 = 2;
|
||||||
Math_SmoothStepToF(&player->aerobaticPitch, 360.0f, 0.1f, 5.0f, 0.001f);
|
Math_SmoothStepToF(&player->aerobaticPitch, 360.0f, 0.1f, 5.0f, 0.001f);
|
||||||
|
|
||||||
if (player->aerobaticPitch > 350.0f) {
|
if (player->aerobaticPitch > 350.0f) {
|
||||||
player->somersault = false;
|
player->somersault = false;
|
||||||
if (gLevelMode != LEVELMODE_ON_RAILS) {
|
if (gLevelMode != LEVELMODE_ON_RAILS) {
|
||||||
@ -3798,7 +3759,6 @@ void Player_PerformLoop(Player* player) {
|
|||||||
player->vel.y = sp40.y;
|
player->vel.y = sp40.y;
|
||||||
player->pos.x += player->vel.x;
|
player->pos.x += player->vel.x;
|
||||||
player->pos.y += player->vel.y;
|
player->pos.y += player->vel.y;
|
||||||
|
|
||||||
if (player->pos.y < player->pathFloor + player->yPath) {
|
if (player->pos.y < player->pathFloor + player->yPath) {
|
||||||
player->pos.y = player->pathFloor + player->yPath;
|
player->pos.y = player->pathFloor + player->yPath;
|
||||||
player->vel.y = 0.0f;
|
player->vel.y = 0.0f;
|
||||||
@ -4044,7 +4004,6 @@ void Player_MoveTank360(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate, 0.1f);
|
Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate, 0.1f);
|
||||||
}
|
}
|
||||||
player->rot_104.y = player->rot.y;
|
player->rot_104.y = player->rot.y;
|
||||||
|
|
||||||
var_fa0 = 0.03f;
|
var_fa0 = 0.03f;
|
||||||
var_fa1 = 1.5f;
|
var_fa1 = 1.5f;
|
||||||
if ((player->zRotBank > 10.0f) && (sp5C < 0.0f)) {
|
if ((player->zRotBank > 10.0f) && (sp5C < 0.0f)) {
|
||||||
@ -4080,7 +4039,6 @@ void Player_MoveTank360(Player* player) {
|
|||||||
sp44.z = player->baseSpeed;
|
sp44.z = player->baseSpeed;
|
||||||
sp44.z -= fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f);
|
sp44.z -= fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f);
|
||||||
sp44.z += SIN_DEG(player->unk_000) * player->boostSpeed;
|
sp44.z += SIN_DEG(player->unk_000) * player->boostSpeed;
|
||||||
|
|
||||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||||
|
|
||||||
player->vel.x = sp38.x;
|
player->vel.x = sp38.x;
|
||||||
@ -4117,7 +4075,6 @@ void Player_MoveTank360(Player* player) {
|
|||||||
player->pos.x += player->vel.x;
|
player->pos.x += player->vel.x;
|
||||||
player->vel.y -= player->gravity;
|
player->vel.y -= player->gravity;
|
||||||
player->pos.y += player->vel.y;
|
player->pos.y += player->vel.y;
|
||||||
|
|
||||||
if (player->grounded) {
|
if (player->grounded) {
|
||||||
Math_SmoothStepToAngle(&player->rot.x, player->rot_104.x, 0.2f, 5.0f, 0.005f);
|
Math_SmoothStepToAngle(&player->rot.x, player->rot_104.x, 0.2f, 5.0f, 0.005f);
|
||||||
Math_SmoothStepToAngle(&player->rot.z, player->rot_104.z, 0.2f, 5.0f, 0.005f);
|
Math_SmoothStepToAngle(&player->rot.z, player->rot_104.z, 0.2f, 5.0f, 0.005f);
|
||||||
@ -4146,7 +4103,6 @@ void Player_MoveTank360(Player* player) {
|
|||||||
Player_CheckBounds360(player);
|
Player_CheckBounds360(player);
|
||||||
player->trueZpos = player->pos.z;
|
player->trueZpos = player->pos.z;
|
||||||
player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll;
|
player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll;
|
||||||
|
|
||||||
if (player->grounded) {
|
if (player->grounded) {
|
||||||
player->rockPhase += player->baseSpeed * 5.0f;
|
player->rockPhase += player->baseSpeed * 5.0f;
|
||||||
player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f;
|
player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f;
|
||||||
@ -4185,7 +4141,6 @@ void Player_MoveOnFoot(Player* player) {
|
|||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
player->camRoll = 0.0f;
|
player->camRoll = 0.0f;
|
||||||
|
|
||||||
var_fa0 = 0.0f;
|
var_fa0 = 0.0f;
|
||||||
if (player->pos.y > 10.0f) {
|
if (player->pos.y > 10.0f) {
|
||||||
var_fa0 = 20.0f;
|
var_fa0 = 20.0f;
|
||||||
@ -4280,12 +4235,10 @@ void Player_MoveOnFoot(Player* player) {
|
|||||||
if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) {
|
if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) {
|
||||||
player->unk_00C = 0.0f;
|
player->unk_00C = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->yBob = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f);
|
player->yBob = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f);
|
||||||
if (player->yBob < -0.5f) {
|
if (player->yBob < -0.5f) {
|
||||||
player->yBob = -0.5f;
|
player->yBob = -0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->yBob -= 3.0f;
|
player->yBob -= 3.0f;
|
||||||
player->unk_20C = player->unk_00C;
|
player->unk_20C = player->unk_00C;
|
||||||
|
|
||||||
@ -4309,7 +4262,6 @@ void Player_MoveOnFoot(Player* player) {
|
|||||||
if (player->unk_010 < 50.0f) {
|
if (player->unk_010 < 50.0f) {
|
||||||
player->unk_010 += 2.0f;
|
player->unk_010 += 2.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp64 = player->baseSpeed;
|
sp64 = player->baseSpeed;
|
||||||
if (gGameFrameCount & 4) {
|
if (gGameFrameCount & 4) {
|
||||||
sp64 = 2.0f * player->baseSpeed;
|
sp64 = 2.0f * player->baseSpeed;
|
||||||
@ -4346,7 +4298,6 @@ void Player_MoveOnFoot(Player* player) {
|
|||||||
player->unk_00C = 0.0f;
|
player->unk_00C = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player->grounded) {
|
if (!player->grounded) {
|
||||||
switch (gPlayerNum) {
|
switch (gPlayerNum) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -4364,7 +4315,6 @@ void Player_MoveOnFoot(Player* player) {
|
|||||||
}
|
}
|
||||||
Math_SmoothStepToVec3fArray(sp48, player->jointTable, 1, 24, 0.2f, 10.0f, 0.01f);
|
Math_SmoothStepToVec3fArray(sp48, player->jointTable, 1, 24, 0.2f, 10.0f, 0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->gravity = 2.0f;
|
player->gravity = 2.0f;
|
||||||
if ((gInputPress->button & Z_TRIG) && player->grounded) {
|
if ((gInputPress->button & Z_TRIG) && player->grounded) {
|
||||||
player->vel.y = 12.0f;
|
player->vel.y = 12.0f;
|
||||||
@ -4471,7 +4421,6 @@ void Player_Setup(Player* playerx) {
|
|||||||
player->pathFloor = gGroundHeight + 40.0f;
|
player->pathFloor = gGroundHeight + 40.0f;
|
||||||
player->unk_0A8 = 3000.0f;
|
player->unk_0A8 = 3000.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->baseSpeed = gArwingSpeed;
|
player->baseSpeed = gArwingSpeed;
|
||||||
player->pos.y = 350.0f;
|
player->pos.y = 350.0f;
|
||||||
|
|
||||||
@ -4512,7 +4461,6 @@ void Player_Setup(Player* playerx) {
|
|||||||
if (gCurrentLevel != LEVEL_CORNERIA) {
|
if (gCurrentLevel != LEVEL_CORNERIA) {
|
||||||
gSavedGroundSurface = SURFACE_GRASS;
|
gSavedGroundSurface = SURFACE_GRASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
gGoldRingCount[0] = gSavedGoldRingCount[0];
|
gGoldRingCount[0] = gSavedGoldRingCount[0];
|
||||||
do {
|
do {
|
||||||
if (gGoldRingCount[0] > 3) {
|
if (gGoldRingCount[0] > 3) {
|
||||||
@ -4551,7 +4499,6 @@ void Player_Setup(Player* playerx) {
|
|||||||
gGroundSurface = gSavedGroundSurface;
|
gGroundSurface = gSavedGroundSurface;
|
||||||
gPathProgress = player->zPath = gSavedPathProgress;
|
gPathProgress = player->zPath = gSavedPathProgress;
|
||||||
player->pos.z = player->trueZpos = -player->zPath;
|
player->pos.z = player->trueZpos = -player->zPath;
|
||||||
|
|
||||||
if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||||
if (gCurrentLevel == LEVEL_MACBETH) {
|
if (gCurrentLevel == LEVEL_MACBETH) {
|
||||||
sp2E = gObjectLoadIndex;
|
sp2E = gObjectLoadIndex;
|
||||||
@ -4577,7 +4524,6 @@ void Player_Setup(Player* playerx) {
|
|||||||
player->pos.z = D_800D3124[gPlayerNum];
|
player->pos.z = D_800D3124[gPlayerNum];
|
||||||
player->yRot_114 = D_800D3154[gPlayerNum];
|
player->yRot_114 = D_800D3154[gPlayerNum];
|
||||||
player->form = gPlayerForms[gPlayerNum];
|
player->form = gPlayerForms[gPlayerNum];
|
||||||
|
|
||||||
switch (player->form) {
|
switch (player->form) {
|
||||||
case FORM_ARWING:
|
case FORM_ARWING:
|
||||||
break;
|
break;
|
||||||
@ -4592,7 +4538,6 @@ void Player_Setup(Player* playerx) {
|
|||||||
player->pos.y = 0.0f;
|
player->pos.y = 0.0f;
|
||||||
player->baseSpeed = 15.0f;
|
player->baseSpeed = 15.0f;
|
||||||
player->groundPos.y = 0;
|
player->groundPos.y = 0;
|
||||||
|
|
||||||
switch (gPlayerNum) {
|
switch (gPlayerNum) {
|
||||||
case 0:
|
case 0:
|
||||||
sp38 = LOAD_ASSET(D_versus_302E56C);
|
sp38 = LOAD_ASSET(D_versus_302E56C);
|
||||||
@ -4820,7 +4765,6 @@ void Player_UpdateArwingRoll(Player* player) {
|
|||||||
|
|
||||||
Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f);
|
Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f);
|
||||||
player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f);
|
player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f);
|
||||||
|
|
||||||
if (player->barrelRollAlpha > 0) {
|
if (player->barrelRollAlpha > 0) {
|
||||||
player->barrelRollAlpha -= 30;
|
player->barrelRollAlpha -= 30;
|
||||||
if (player->barrelRollAlpha <= 0) {
|
if (player->barrelRollAlpha <= 0) {
|
||||||
@ -4911,7 +4855,6 @@ void Player_UpdateTankRoll(Player* player) {
|
|||||||
player->zRotBank = 0.0f;
|
player->zRotBank = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->zRotBank < 0.0f) {
|
if (player->zRotBank < 0.0f) {
|
||||||
player->zRotBank += 8.0f;
|
player->zRotBank += 8.0f;
|
||||||
if (player->zRotBank > 0.0f) {
|
if (player->zRotBank > 0.0f) {
|
||||||
@ -4971,7 +4914,6 @@ void Player_ArwingBoost(Player* player) {
|
|||||||
player->sfx.boost = 0;
|
player->sfx.boost = 0;
|
||||||
|
|
||||||
var = gInputPress->stick_y; // fake?
|
var = gInputPress->stick_y; // fake?
|
||||||
|
|
||||||
if (gLoopDownTimers[gPlayerNum] != 0) {
|
if (gLoopDownTimers[gPlayerNum] != 0) {
|
||||||
gLoopDownTimers[gPlayerNum]--;
|
gLoopDownTimers[gPlayerNum]--;
|
||||||
}
|
}
|
||||||
@ -5143,7 +5085,6 @@ void Player_ArwingBrake(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f);
|
Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f);
|
Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->boostMeter += sp30;
|
player->boostMeter += sp30;
|
||||||
if (player->boostMeter > 90.0f) {
|
if (player->boostMeter > 90.0f) {
|
||||||
player->boostCooldown = true;
|
player->boostCooldown = true;
|
||||||
@ -5182,7 +5123,6 @@ void Player_TankBoostBrake(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->boostMeter, 0.0f, 1.0f, 1.0f, 0.0f);
|
Math_SmoothStepToF(&player->boostMeter, 0.0f, 1.0f, 1.0f, 0.0f);
|
||||||
}
|
}
|
||||||
player->boostActive = false;
|
player->boostActive = false;
|
||||||
|
|
||||||
if (player->boostMeter == 0.0f) {
|
if (player->boostMeter == 0.0f) {
|
||||||
player->boostCooldown = false;
|
player->boostCooldown = false;
|
||||||
} else if (!(gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG) &&
|
} else if (!(gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG) &&
|
||||||
@ -5206,7 +5146,6 @@ void Player_TankBoostBrake(Player* player) {
|
|||||||
player->boostCooldown = true;
|
player->boostCooldown = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) {
|
if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) {
|
||||||
if (player->boostMeter == 0.0f) {
|
if (player->boostMeter == 0.0f) {
|
||||||
Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BRAKE, player->num);
|
Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BRAKE, player->num);
|
||||||
@ -5234,7 +5173,6 @@ void Player_UpdateTankJets(Player* player) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
player->unk_188 = 0.0f;
|
player->unk_188 = 0.0f;
|
||||||
|
|
||||||
player->zRotBank += 4.0f;
|
player->zRotBank += 4.0f;
|
||||||
if (player->zRotBank > 50.0f) {
|
if (player->zRotBank > 50.0f) {
|
||||||
player->zRotBank = 50.0f;
|
player->zRotBank = 50.0f;
|
||||||
@ -5268,7 +5206,6 @@ void Player_UpdateTankJets(Player* player) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
player->unk_188 = 0.0f;
|
player->unk_188 = 0.0f;
|
||||||
|
|
||||||
player->zRotBank -= 4.0f;
|
player->zRotBank -= 4.0f;
|
||||||
if (player->zRotBank < -50.0f) {
|
if (player->zRotBank < -50.0f) {
|
||||||
player->zRotBank = -50.0f;
|
player->zRotBank = -50.0f;
|
||||||
@ -5294,7 +5231,6 @@ void Player_UpdateTankJets(Player* player) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) {
|
if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) {
|
||||||
player->zRotBank += (((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f);
|
player->zRotBank += (((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f);
|
||||||
Math_SmoothStepToAngle(&player->rot.x, 0.0f, 0.05f, 5.0f, 0.00001f);
|
Math_SmoothStepToAngle(&player->rot.x, 0.0f, 0.05f, 5.0f, 0.00001f);
|
||||||
@ -5356,7 +5292,6 @@ void Player_UpdateEffects(Player* player) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gRightWingFlashTimer[player->num] != 0) {
|
if (gRightWingFlashTimer[player->num] != 0) {
|
||||||
gRightWingFlashTimer[player->num]--;
|
gRightWingFlashTimer[player->num]--;
|
||||||
if (gRightWingFlashTimer[player->num] == 1000) {
|
if (gRightWingFlashTimer[player->num] == 1000) {
|
||||||
@ -5375,7 +5310,6 @@ void Player_UpdateEffects(Player* player) {
|
|||||||
if (gRightWingDebrisTimer[player->num] != 0) {
|
if (gRightWingDebrisTimer[player->num] != 0) {
|
||||||
gRightWingDebrisTimer[player->num]--;
|
gRightWingDebrisTimer[player->num]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gShieldTimer[player->num] != 0) {
|
if (gShieldTimer[player->num] != 0) {
|
||||||
gShieldTimer[player->num]--;
|
gShieldTimer[player->num]--;
|
||||||
Math_SmoothStepToF(&gShieldAlpha[player->num], 128.0f, 1.0f, 40.0f, 0.01f);
|
Math_SmoothStepToF(&gShieldAlpha[player->num], 128.0f, 1.0f, 40.0f, 0.01f);
|
||||||
@ -5410,7 +5344,6 @@ void Player_UpdateEffects(Player* player) {
|
|||||||
}
|
}
|
||||||
player->timer_278--;
|
player->timer_278--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->hitTimer > 0) {
|
if (player->hitTimer > 0) {
|
||||||
if (player->hitTimer > 3) {
|
if (player->hitTimer > 3) {
|
||||||
*gControllerRumble = 1;
|
*gControllerRumble = 1;
|
||||||
@ -5438,7 +5371,6 @@ void Player_UpdateEffects(Player* player) {
|
|||||||
player->rot.y = 0;
|
player->rot.y = 0;
|
||||||
Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0);
|
Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->hitTimer == 0) {
|
if (player->hitTimer == 0) {
|
||||||
player->damageShake = 0;
|
player->damageShake = 0;
|
||||||
}
|
}
|
||||||
@ -5513,7 +5445,6 @@ void Play_dummy_800B41E0(Player* player) {
|
|||||||
|
|
||||||
void Player_Down(Player* player) {
|
void Player_Down(Player* player) {
|
||||||
player->state_1C8 = PLAYERSTATE_1C8_DOWN;
|
player->state_1C8 = PLAYERSTATE_1C8_DOWN;
|
||||||
|
|
||||||
if (!gVersusMode) {
|
if (!gVersusMode) {
|
||||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
|
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
|
||||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
|
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
|
||||||
@ -5542,19 +5473,16 @@ void Player_UpdateOnRails(Player* player) {
|
|||||||
gInputHold->button = gBoostButton[player->num];
|
gInputHold->button = gBoostButton[player->num];
|
||||||
player->boostMeter = 1.0f;
|
player->boostMeter = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player_ArwingBank(player);
|
Player_ArwingBank(player);
|
||||||
Player_ArwingBoost(player);
|
Player_ArwingBoost(player);
|
||||||
Player_ArwingBrake(player);
|
Player_ArwingBrake(player);
|
||||||
Play_dummy_800B41E0(player);
|
Play_dummy_800B41E0(player);
|
||||||
Player_UpdateArwingRoll(player);
|
Player_UpdateArwingRoll(player);
|
||||||
|
|
||||||
if (player->somersault) {
|
if (player->somersault) {
|
||||||
Player_PerformLoop(player);
|
Player_PerformLoop(player);
|
||||||
} else {
|
} else {
|
||||||
Player_MoveArwingOnRails(player);
|
Player_MoveArwingOnRails(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
Player_UpdatePath(player);
|
Player_UpdatePath(player);
|
||||||
Player_Shoot(player);
|
Player_Shoot(player);
|
||||||
Player_CollisionCheck(player);
|
Player_CollisionCheck(player);
|
||||||
@ -5562,7 +5490,6 @@ void Player_UpdateOnRails(Player* player) {
|
|||||||
Player_WaterEffects(player);
|
Player_WaterEffects(player);
|
||||||
Player_FloorCheck(player);
|
Player_FloorCheck(player);
|
||||||
Player_LowHealthAlarm(player);
|
Player_LowHealthAlarm(player);
|
||||||
|
|
||||||
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
||||||
Player_Down(player);
|
Player_Down(player);
|
||||||
player->vel.x *= 0.2f;
|
player->vel.x *= 0.2f;
|
||||||
@ -5591,7 +5518,6 @@ void Player_UpdateOnRails(Player* player) {
|
|||||||
Player_CollisionCheck(player);
|
Player_CollisionCheck(player);
|
||||||
Player_FloorCheck(player);
|
Player_FloorCheck(player);
|
||||||
Player_LowHealthAlarm(player);
|
Player_LowHealthAlarm(player);
|
||||||
|
|
||||||
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
||||||
Player_Down(player);
|
Player_Down(player);
|
||||||
}
|
}
|
||||||
@ -5607,19 +5533,16 @@ void Player_Update360(Player* player) {
|
|||||||
Player_ArwingBrake(player);
|
Player_ArwingBrake(player);
|
||||||
Play_dummy_800B41E0(player);
|
Play_dummy_800B41E0(player);
|
||||||
Player_UpdateArwingRoll(player);
|
Player_UpdateArwingRoll(player);
|
||||||
|
|
||||||
if (player->somersault) {
|
if (player->somersault) {
|
||||||
Player_PerformLoop(player);
|
Player_PerformLoop(player);
|
||||||
} else {
|
} else {
|
||||||
Player_MoveArwing360(player);
|
Player_MoveArwing360(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
Player_Shoot(player);
|
Player_Shoot(player);
|
||||||
Player_CollisionCheck(player);
|
Player_CollisionCheck(player);
|
||||||
Player_WaterEffects(player);
|
Player_WaterEffects(player);
|
||||||
Player_FloorCheck(player);
|
Player_FloorCheck(player);
|
||||||
Player_LowHealthAlarm(player);
|
Player_LowHealthAlarm(player);
|
||||||
|
|
||||||
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
||||||
Player_Down(player);
|
Player_Down(player);
|
||||||
player->vel.y = 5.0f;
|
player->vel.y = 5.0f;
|
||||||
@ -5665,7 +5588,6 @@ void Player_Update360(Player* player) {
|
|||||||
Player_CollisionCheck(player);
|
Player_CollisionCheck(player);
|
||||||
Player_FloorCheck(player);
|
Player_FloorCheck(player);
|
||||||
Player_LowHealthAlarm(player);
|
Player_LowHealthAlarm(player);
|
||||||
|
|
||||||
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
if ((player->shields <= 0) && (player->radioDamageTimer != 0)) {
|
||||||
Player_Down(player);
|
Player_Down(player);
|
||||||
}
|
}
|
||||||
@ -5885,7 +5807,6 @@ void Player_Update(Player* player) {
|
|||||||
Player_CheckItemCollect(player);
|
Player_CheckItemCollect(player);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
|
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
|
||||||
player->alternateView = false;
|
player->alternateView = false;
|
||||||
gPauseEnabled = false;
|
gPauseEnabled = false;
|
||||||
@ -5963,7 +5884,6 @@ void Player_Update(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->cam.eye.y, 500.0f, 0.05f, 10.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.y, 500.0f, 0.05f, 10.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + 500.0f, 0.05f, 20.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + 500.0f, 0.05f, 20.0f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->csTimer == 0) {
|
if (player->csTimer == 0) {
|
||||||
if (gCamCount == 4) {
|
if (gCamCount == 4) {
|
||||||
player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
|
player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
|
||||||
@ -6011,13 +5931,11 @@ void Player_Update(Player* player) {
|
|||||||
gDrawMode = DRAW_NONE;
|
gDrawMode = DRAW_NONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
gNextGameState = GSTATE_MAP;
|
gNextGameState = GSTATE_MAP;
|
||||||
gLastGameState = GSTATE_PLAY;
|
gLastGameState = GSTATE_PLAY;
|
||||||
gDrawMode = DRAW_NONE;
|
gDrawMode = DRAW_NONE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gDrawMode = DRAW_NONE;
|
gDrawMode = DRAW_NONE;
|
||||||
break;
|
break;
|
||||||
@ -6044,7 +5962,6 @@ void Player_Update(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->unk_148, sp1CC, 1.0f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&player->unk_148, sp1CC, 1.0f, 0.05f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->unk_14C, sp1CC, 1.0f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&player->unk_14C, sp1CC, 1.0f, 0.05f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->pathWidth, sp1C8, 1.0f, 10.0f, 0.0f);
|
Math_SmoothStepToF(&player->pathWidth, sp1C8, 1.0f, 10.0f, 0.0f);
|
||||||
|
|
||||||
if (player->form == FORM_ARWING) {
|
if (player->form == FORM_ARWING) {
|
||||||
Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f);
|
Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f);
|
||||||
if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
||||||
@ -6065,7 +5982,6 @@ void Camera_UpdateArwingOnRails(Player* player) {
|
|||||||
f32 temp;
|
f32 temp;
|
||||||
|
|
||||||
gCsCamEyeX = (player->pos.x - player->xPath) * player->unk_148;
|
gCsCamEyeX = (player->pos.x - player->xPath) * player->unk_148;
|
||||||
|
|
||||||
if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) ||
|
if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) ||
|
||||||
(player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) {
|
(player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) {
|
||||||
gCsCamEyeY = (player->pos.y - player->yPath) * player->unk_148;
|
gCsCamEyeY = (player->pos.y - player->yPath) * player->unk_148;
|
||||||
@ -6094,7 +6010,6 @@ void Camera_UpdateArwingOnRails(Player* player) {
|
|||||||
gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f;
|
gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f;
|
||||||
gCsCamAtY += player->xRock * 5.0f;
|
gCsCamAtY += player->xRock * 5.0f;
|
||||||
gCsCamAtY -= player->unk_02C * 0.25f;
|
gCsCamAtY -= player->unk_02C * 0.25f;
|
||||||
|
|
||||||
switch (sOverheadCam) {
|
switch (sOverheadCam) {
|
||||||
case 0:
|
case 0:
|
||||||
Math_SmoothStepToF(&sOverheadCamDist, 0.0f, 0.4f, 10.0f, 0);
|
Math_SmoothStepToF(&sOverheadCamDist, 0.0f, 0.4f, 10.0f, 0);
|
||||||
@ -6103,7 +6018,6 @@ void Camera_UpdateArwingOnRails(Player* player) {
|
|||||||
Math_SmoothStepToF(&sOverheadCamDist, 200.0f, 0.4f, 10.0f, 0);
|
Math_SmoothStepToF(&sOverheadCamDist, 200.0f, 0.4f, 10.0f, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gCsCamEyeX += player->xPath;
|
gCsCamEyeX += player->xPath;
|
||||||
gCsCamAtX += player->xPath;
|
gCsCamAtX += player->xPath;
|
||||||
gCsCamEyeY += player->yPath + sOverheadCamDist;
|
gCsCamEyeY += player->yPath + sOverheadCamDist;
|
||||||
@ -6123,14 +6037,12 @@ void Camera_UpdateArwingOnRails(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f);
|
||||||
}
|
}
|
||||||
gCsCamAtY += player->yPath + (sOverheadCamDist * 0.5f);
|
gCsCamAtY += player->yPath + (sOverheadCamDist * 0.5f);
|
||||||
|
|
||||||
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f);
|
||||||
|
|
||||||
temp = -player->rot.z;
|
temp = -player->rot.z;
|
||||||
if (gLevelType == LEVELTYPE_PLANET) {
|
if (gLevelType == LEVELTYPE_PLANET) {
|
||||||
Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f);
|
Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f);
|
||||||
@ -6148,7 +6060,6 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) {
|
|||||||
|
|
||||||
Matrix_RotateY(gCalcMatrix, (player->rot.y + player->damageShake) * M_DTOR * 0.75f, MTXF_NEW);
|
Matrix_RotateY(gCalcMatrix, (player->rot.y + player->damageShake) * M_DTOR * 0.75f, MTXF_NEW);
|
||||||
Matrix_RotateX(gCalcMatrix, (player->rot.x + player->damageShake) * M_DTOR * 0.75f, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, (player->rot.x + player->damageShake) * M_DTOR * 0.75f, MTXF_APPLY);
|
||||||
|
|
||||||
sp4C.x = 0;
|
sp4C.x = 0;
|
||||||
sp4C.y = 0;
|
sp4C.y = 0;
|
||||||
sp4C.z = -1000.0f;
|
sp4C.z = -1000.0f;
|
||||||
@ -6161,7 +6072,6 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) {
|
|||||||
gCsCamAtX = player->pos.x + sp40.x;
|
gCsCamAtX = player->pos.x + sp40.x;
|
||||||
gCsCamAtY = player->pos.y + player->yBob + sp40.y;
|
gCsCamAtY = player->pos.y + player->yBob + sp40.y;
|
||||||
gCsCamAtZ = player->trueZpos + gPathProgress + sp40.z;
|
gCsCamAtZ = player->trueZpos + gPathProgress + sp40.z;
|
||||||
|
|
||||||
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f);
|
||||||
@ -6169,7 +6079,6 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) {
|
|||||||
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0);
|
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0);
|
||||||
|
|
||||||
player->camRoll = -(player->bankAngle + player->rockAngle);
|
player->camRoll = -(player->bankAngle + player->rockAngle);
|
||||||
if (arg1 != 0) {
|
if (arg1 != 0) {
|
||||||
player->cam.eye.x = gCsCamEyeX;
|
player->cam.eye.x = gCsCamEyeX;
|
||||||
@ -6271,7 +6180,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
|
|||||||
|
|
||||||
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_NEW);
|
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_NEW);
|
||||||
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
sp74.x = 0.0f;
|
sp74.x = 0.0f;
|
||||||
sp74.y = 0.0f;
|
sp74.y = 0.0f;
|
||||||
if (player->alternateView) {
|
if (player->alternateView) {
|
||||||
@ -6279,7 +6187,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
|
|||||||
} else {
|
} else {
|
||||||
sp74.z = 300.0f - player->camDist;
|
sp74.z = 300.0f - player->camDist;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->somersault) {
|
if (player->somersault) {
|
||||||
sp74.z += 500.0f;
|
sp74.z += 500.0f;
|
||||||
}
|
}
|
||||||
@ -6302,7 +6209,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
|
|||||||
atX = player->pos.x + player->damageShake;
|
atX = player->pos.x + player->damageShake;
|
||||||
|
|
||||||
var_fv0 = (player->somersault) ? 1.0f : 0.79f;
|
var_fv0 = (player->somersault) ? 1.0f : 0.79f;
|
||||||
|
|
||||||
atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->xRock * 5.0f);
|
atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->xRock * 5.0f);
|
||||||
atY += (player->unk_02C * 0.5f);
|
atY += (player->unk_02C * 0.5f);
|
||||||
if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) {
|
if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) {
|
||||||
@ -6322,7 +6228,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
|
|||||||
eyeZ += sp68.z;
|
eyeZ += sp68.z;
|
||||||
atX += sp68.x;
|
atX += sp68.x;
|
||||||
atZ += sp68.z;
|
atZ += sp68.z;
|
||||||
|
|
||||||
if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) {
|
if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) {
|
||||||
Math_SmoothStepToF(&player->cam.eye.x, eyeX, player->unk_014, 30000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.x, eyeX, player->unk_014, 30000.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.eye.y, eyeY, player->unk_014, 30000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.y, eyeY, player->unk_014, 30000.0f, 0);
|
||||||
@ -6330,7 +6235,6 @@ void Camera_UpdateArwing360(Player* player, bool arg1) {
|
|||||||
Math_SmoothStepToF(&player->camRoll, player->rot.y * -0.3f, 0.1f, 1.0f, 0);
|
Math_SmoothStepToF(&player->camRoll, player->rot.y * -0.3f, 0.1f, 1.0f, 0);
|
||||||
Math_SmoothStepToF(&player->unk_014, 0.2f, 0.1f, 0.005f, 0.0f);
|
Math_SmoothStepToF(&player->unk_014, 0.2f, 0.1f, 0.005f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Math_SmoothStepToF(&player->cam.at.x, atX, player->unk_01C, 30000.0f, 0);
|
Math_SmoothStepToF(&player->cam.at.x, atX, player->unk_01C, 30000.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.at.y, atY, player->unk_018, 30000.0f, 0);
|
Math_SmoothStepToF(&player->cam.at.y, atY, player->unk_018, 30000.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0);
|
Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0);
|
||||||
@ -6358,7 +6262,6 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
|
|||||||
Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
sp54.x = 0.0f;
|
sp54.x = 0.0f;
|
||||||
if (player->alternateView) {
|
if (player->alternateView) {
|
||||||
sp54.y = 150.0f;
|
sp54.y = 150.0f;
|
||||||
@ -6369,7 +6272,6 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48);
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48);
|
||||||
|
|
||||||
if (player->alternateView) {
|
if (player->alternateView) {
|
||||||
Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f);
|
Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f);
|
||||||
} else {
|
} else {
|
||||||
@ -6402,7 +6304,6 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
|
|||||||
Math_SmoothStepToF(&player->cam.eye.y, sp40, 0.1f, 200.0f, 0.001f);
|
Math_SmoothStepToF(&player->cam.eye.y, sp40, 0.1f, 200.0f, 0.001f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.z, sp3C, 0.1f, 200.0f, 0.001f);
|
Math_SmoothStepToF(&player->cam.eye.z, sp3C, 0.1f, 200.0f, 0.001f);
|
||||||
Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f);
|
Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f);
|
||||||
|
|
||||||
if (arg1 != 0) {
|
if (arg1 != 0) {
|
||||||
player->cam.eye.x = sp44;
|
player->cam.eye.x = sp44;
|
||||||
player->cam.eye.y = sp40;
|
player->cam.eye.y = sp40;
|
||||||
@ -6454,7 +6355,6 @@ void Camera_UpdateOnFoot360(Player* player, s32 arg1) {
|
|||||||
Math_SmoothStepToF(&player->cam.eye.y, sp4C.y, 0.3f, 65.0f, 0.001f);
|
Math_SmoothStepToF(&player->cam.eye.y, sp4C.y, 0.3f, 65.0f, 0.001f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.z, sp4C.z, 0.3f, 65.0f, 0.001f);
|
Math_SmoothStepToF(&player->cam.eye.z, sp4C.z, 0.3f, 65.0f, 0.001f);
|
||||||
Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f);
|
Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f);
|
||||||
|
|
||||||
if (arg1 != 0) {
|
if (arg1 != 0) {
|
||||||
player->cam.eye.x = sp4C.x;
|
player->cam.eye.x = sp4C.x;
|
||||||
player->cam.eye.y = sp4C.y;
|
player->cam.eye.y = sp4C.y;
|
||||||
@ -6479,7 +6379,6 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
|
|||||||
if (yaw <= -M_PI / 2) {
|
if (yaw <= -M_PI / 2) {
|
||||||
yaw += M_PI;
|
yaw += M_PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempf = 0.0f;
|
tempf = 0.0f;
|
||||||
if (gCurrentLevel == LEVEL_UNK_15) {
|
if (gCurrentLevel == LEVEL_UNK_15) {
|
||||||
tempf = gPlayer[0].cam.eye.y * 0.03f;
|
tempf = gPlayer[0].cam.eye.y * 0.03f;
|
||||||
@ -6563,7 +6462,6 @@ void Camera_Update(Player* player) {
|
|||||||
player->cam.at.z = player->trueZpos + gPathProgress - 1.0f;
|
player->cam.at.z = player->trueZpos + gPathProgress - 1.0f;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLAYERSTATE_1C8_NEXT:
|
case PLAYERSTATE_1C8_NEXT:
|
||||||
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
|
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
|
||||||
break;
|
break;
|
||||||
@ -7027,7 +6925,6 @@ void Play_Main(void) {
|
|||||||
Audio_ClearVoice();
|
Audio_ClearVoice();
|
||||||
Audio_SetEnvSfxReverb(0);
|
Audio_SetEnvSfxReverb(0);
|
||||||
Play_ClearObjectData();
|
Play_ClearObjectData();
|
||||||
|
|
||||||
for (i = 0; i < gCamCount; i++) {
|
for (i = 0; i < gCamCount; i++) {
|
||||||
Audio_KillSfxBySource(gPlayer[i].sfxSource);
|
Audio_KillSfxBySource(gPlayer[i].sfxSource);
|
||||||
Audio_StopPlayerNoise(i);
|
Audio_StopPlayerNoise(i);
|
||||||
|
@ -33,7 +33,6 @@ void Graphics_NMIWipe(void) {
|
|||||||
if (sWipeBarLength == 0) {
|
if (sWipeBarLength == 0) {
|
||||||
AudioThread_PreNMIReset();
|
AudioThread_PreNMIReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
sWipeBarLength += SCREEN_WIDTH / 7;
|
sWipeBarLength += SCREEN_WIDTH / 7;
|
||||||
if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing?
|
if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing?
|
||||||
osViBlack(true);
|
osViBlack(true);
|
||||||
|
@ -866,7 +866,6 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
|
|||||||
player->rollRate = player->baseRollRate = -20;
|
player->rollRate = player->baseRollRate = -20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) &&
|
if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) &&
|
||||||
(D_800C9F10 <= arg3 + sp58.y)) {
|
(D_800C9F10 <= arg3 + sp58.y)) {
|
||||||
D_800C9F10 = arg3 + sp58.y;
|
D_800C9F10 = arg3 + sp58.y;
|
||||||
@ -1458,7 +1457,6 @@ void func_tank_800481F4(Player* player) {
|
|||||||
player->vel.x = 0.0f;
|
player->vel.x = 0.0f;
|
||||||
player->vel.y = 30.0f;
|
player->vel.y = 30.0f;
|
||||||
player->pos.x = player->basePos.x;
|
player->pos.x = player->basePos.x;
|
||||||
|
|
||||||
actor->dmgType = DMG_COLLISION;
|
actor->dmgType = DMG_COLLISION;
|
||||||
if (actor->info.damage != 0) {
|
if (actor->info.damage != 0) {
|
||||||
Player_ApplyDamage(player, 0, 20);
|
Player_ApplyDamage(player, 0, 20);
|
||||||
|
227
src/mods/sfxjukebox2.c
Normal file
227
src/mods/sfxjukebox2.c
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "fox_map.h"
|
||||||
|
#include "fox_option.h"
|
||||||
|
#include "sf64audio_provisional.h"
|
||||||
|
|
||||||
|
extern s32 spectrumAnalyzerMode;
|
||||||
|
extern bool D_menu_801B9320;
|
||||||
|
extern s32 D_menu_801B9244;
|
||||||
|
extern OptionId D_menu_801B9124;
|
||||||
|
extern s32 D_menu_801B912C;
|
||||||
|
|
||||||
|
static s32 showJukebox = 0;
|
||||||
|
static u32 prevSfx = NA_SE_NONE;
|
||||||
|
static u32 sfx = NA_SE_NONE;
|
||||||
|
static s32 sfxId = 0;
|
||||||
|
static u32 sfxBank = SFX_BANK_PLAYER;
|
||||||
|
static u32 sfxRange = 0;
|
||||||
|
static s32 sfxImport = 0;
|
||||||
|
static int holdTimer = 0;
|
||||||
|
static u8 sfxFlag = 0;
|
||||||
|
static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" };
|
||||||
|
static u8 bankSizes[] = { 0x33, 0x85, 0x9C, 0x9C, 0x37 };
|
||||||
|
static u32 sfxEditMode = 9;
|
||||||
|
static u32 srcEditMode = 0;
|
||||||
|
static u32 editMode = 0;
|
||||||
|
static s32 srcVec[3] = { 0, 0, 0 };
|
||||||
|
static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
|
void Jukebox_SelectFlag(u8* flag) {
|
||||||
|
if (gControllerPress[gMainController].button & (U_CBUTTONS | D_CBUTTONS | R_CBUTTONS | L_CBUTTONS)) {
|
||||||
|
*flag ^= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Jukebox_SelectWrap(u32* option, s32 range) {
|
||||||
|
if (gControllerPress[gMainController].button & (U_CBUTTONS | R_CBUTTONS)) {
|
||||||
|
(*option)++;
|
||||||
|
} else if (gControllerPress[gMainController].button & (D_CBUTTONS | L_CBUTTONS)) {
|
||||||
|
(*option)--;
|
||||||
|
}
|
||||||
|
*option = (*option + range) % range;
|
||||||
|
}
|
||||||
|
|
||||||
|
Jukebox_SelectClamp(s32* option, s32 range, s32 skip) {
|
||||||
|
OSContPad* contPress = &gControllerPress[gMainController];
|
||||||
|
OSContPad* contHold = &gControllerHold[gMainController];
|
||||||
|
|
||||||
|
if (contHold->button & (U_CBUTTONS | D_CBUTTONS)) {
|
||||||
|
holdTimer++;
|
||||||
|
} else {
|
||||||
|
holdTimer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) {
|
||||||
|
(*option)++;
|
||||||
|
} else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) {
|
||||||
|
(*option)--;
|
||||||
|
} else if (contPress->button & L_CBUTTONS) {
|
||||||
|
*option -= skip;
|
||||||
|
} else if (contPress->button & R_CBUTTONS) {
|
||||||
|
*option += skip;
|
||||||
|
}
|
||||||
|
if (*option < 0) {
|
||||||
|
*option = 0;
|
||||||
|
} else if (*option >= range) {
|
||||||
|
*option = range - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Jukebox_UpdateSource(void) {
|
||||||
|
OSContPad* contPress = &gControllerPress[gMainController];
|
||||||
|
OSContPad* contHold = &gControllerHold[gMainController];
|
||||||
|
|
||||||
|
if (contPress->button & L_JPAD) {
|
||||||
|
srcEditMode--;
|
||||||
|
} else if (contPress->button & R_JPAD) {
|
||||||
|
srcEditMode++;
|
||||||
|
}
|
||||||
|
srcEditMode = (srcEditMode + 3) % 3;
|
||||||
|
|
||||||
|
if (contHold->button & (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) {
|
||||||
|
holdTimer++;
|
||||||
|
} else {
|
||||||
|
holdTimer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) {
|
||||||
|
sfxSource[srcEditMode] += 100.0f;
|
||||||
|
} else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) {
|
||||||
|
sfxSource[srcEditMode] -= 100.0f;
|
||||||
|
} else if (((contHold->button & R_CBUTTONS) && (holdTimer > 15)) || (contPress->button & R_CBUTTONS)) {
|
||||||
|
sfxSource[srcEditMode] += 10.0f;
|
||||||
|
} else if (((contHold->button & L_CBUTTONS) && (holdTimer > 15)) || (contPress->button & L_CBUTTONS)) {
|
||||||
|
sfxSource[srcEditMode] -= 10.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Jukebox_UpdateSfx(void) {
|
||||||
|
s32 i;
|
||||||
|
u16 flags = 0;
|
||||||
|
|
||||||
|
if (gControllerPress[gMainController].button & L_JPAD) {
|
||||||
|
sfxEditMode--;
|
||||||
|
} else if (gControllerPress[gMainController].button & R_JPAD) {
|
||||||
|
sfxEditMode++;
|
||||||
|
}
|
||||||
|
sfxEditMode = (sfxEditMode + 13) % 13;
|
||||||
|
switch (sfxEditMode) {
|
||||||
|
case 9:
|
||||||
|
Jukebox_SelectWrap(&sfxBank, 5);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
Jukebox_SelectClamp(&sfxId, bankSizes[sfxBank], 0x10);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
Jukebox_SelectFlag(&sfxFlag);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
Jukebox_SelectWrap(&sfxRange, 4);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
Jukebox_SelectClamp(&sfxImport, 0x100, 0x10);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if ((sfxEditMode >= 0) && (sfxEditMode < 8)) {
|
||||||
|
Jukebox_SelectFlag(&sfxFlags[sfxEditMode]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (i = 0; i < 8; i++) {
|
||||||
|
flags |= sfxFlags[i] << (i + (i > 5));
|
||||||
|
}
|
||||||
|
sfx = SFX_PACK(sfxBank, sfxId, sfxRange, sfxImport, (sfxFlag << 27) | (flags << 18));
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 };
|
||||||
|
s32 srcModeX[] = { 45, 135, 225 };
|
||||||
|
|
||||||
|
void Jukebox_Update(void) {
|
||||||
|
s32 i;
|
||||||
|
OSContPad* contPress = &gControllerPress[gMainController];
|
||||||
|
OSContPad* contHold = &gControllerHold[gMainController];
|
||||||
|
|
||||||
|
if (contPress->button & U_JPAD) {
|
||||||
|
editMode--;
|
||||||
|
} else if (contPress->button & D_JPAD) {
|
||||||
|
editMode++;
|
||||||
|
}
|
||||||
|
editMode %= 2;
|
||||||
|
switch (editMode) {
|
||||||
|
case 0:
|
||||||
|
Jukebox_UpdateSfx();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Jukebox_UpdateSource();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prevSfx != sfx) {
|
||||||
|
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
|
||||||
|
prevSfx = sfx;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (contPress->button & A_BUTTON) {
|
||||||
|
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
|
||||||
|
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
|
||||||
|
AUDIO_PLAY_SFX(sfx, sfxSource, 4);
|
||||||
|
D_menu_801B9320 = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (contPress->button & B_BUTTON) {
|
||||||
|
if (!D_menu_801B9320) {
|
||||||
|
AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4);
|
||||||
|
AUDIO_PLAY_BGM(NA_BGM_SELECT);
|
||||||
|
gDrawMode = DRAW_NONE;
|
||||||
|
D_menu_801B9124 = 1000;
|
||||||
|
D_menu_801B912C = 0;
|
||||||
|
D_menu_801B9244 = 1;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4);
|
||||||
|
Audio_KillSfxBySource(sfxSource);
|
||||||
|
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
|
||||||
|
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
|
||||||
|
D_menu_801B9320 = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spectrum Analyzer mode selector
|
||||||
|
if (contPress->button & Z_TRIG) {
|
||||||
|
spectrumAnalyzerMode++;
|
||||||
|
if (spectrumAnalyzerMode > 2) {
|
||||||
|
spectrumAnalyzerMode = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Draw */
|
||||||
|
|
||||||
|
RCP_SetupDL(&gMasterDisp, SETUPDL_83);
|
||||||
|
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||||
|
|
||||||
|
Graphics_Printf("SFX ID: %08X", sfx);
|
||||||
|
Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0);
|
||||||
|
Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP");
|
||||||
|
Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0],
|
||||||
|
sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7],
|
||||||
|
sfxImport);
|
||||||
|
Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0);
|
||||||
|
|
||||||
|
// Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString);
|
||||||
|
for (i = 0; i < 3; i++) {
|
||||||
|
Graphics_Printf("%5.0f", sfxSource[i]);
|
||||||
|
Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0);
|
||||||
|
}
|
||||||
|
Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X");
|
||||||
|
Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y");
|
||||||
|
Graphics_DisplaySmallText(225, 110, 1.0f, 1.0f, "Z");
|
||||||
|
switch (editMode) {
|
||||||
|
case 0:
|
||||||
|
Graphics_DisplaySmallText(20 + sfxModeX[sfxEditMode], 60, 1.0f, 1.0f, "V");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Graphics_DisplaySmallText(45 + 90 * srcEditMode, 90, 1.0f, 1.0f, "V");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -1065,7 +1065,6 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
||||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||||
|
|
||||||
|
@ -1503,7 +1503,6 @@ void SectorX_LevelStart(Player* player) {
|
|||||||
player->cam.at.z = gCsCamAtZ = -1000.0f;
|
player->cam.at.z = gCsCamAtZ = -1000.0f;
|
||||||
player->camRoll = -5.0f;
|
player->camRoll = -5.0f;
|
||||||
player->baseSpeed = 0.0f;
|
player->baseSpeed = 0.0f;
|
||||||
|
|
||||||
gFillScreenAlpha = 255;
|
gFillScreenAlpha = 255;
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -2398,7 +2398,6 @@ void Zoness_ZoSarumarine_Update(ZoSarumarine* this) {
|
|||||||
sp104 = Math_RadToDeg(sp104);
|
sp104 = Math_RadToDeg(sp104);
|
||||||
sp108 = Math_Atan2F(spB4.y, sqrtf(SQ(spB4.x) + SQ(spB4.z)));
|
sp108 = Math_Atan2F(spB4.y, sqrtf(SQ(spB4.x) + SQ(spB4.z)));
|
||||||
sp108 = Math_RadToDeg(-sp108);
|
sp108 = Math_RadToDeg(-sp108);
|
||||||
|
|
||||||
if ((sp104 > 40.0f) && (sp104 < 180.0f)) {
|
if ((sp104 > 40.0f) && (sp104 < 180.0f)) {
|
||||||
sp104 = 40.0f;
|
sp104 = 40.0f;
|
||||||
}
|
}
|
||||||
@ -2536,7 +2535,6 @@ void Zoness_ZoSarumarine_Update(ZoSarumarine* this) {
|
|||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
D_ctx_801779A8[0] = 20;
|
D_ctx_801779A8[0] = 20;
|
||||||
|
|
||||||
if (gCameraShake == 0) {
|
if (gCameraShake == 0) {
|
||||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
|
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
|
||||||
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
|
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
|
||||||
@ -2801,7 +2799,6 @@ void Zoness_ZoSarumarine_Update(ZoSarumarine* this) {
|
|||||||
sZoFwork[ZO_BSF_82] -= 10.0f;
|
sZoFwork[ZO_BSF_82] -= 10.0f;
|
||||||
|
|
||||||
func_effect_8007D0E0(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], 5.0f);
|
func_effect_8007D0E0(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], 5.0f);
|
||||||
|
|
||||||
if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y] - 100.0f,
|
if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y] - 100.0f,
|
||||||
sZoFwork[ZO_BSF_29_Z]) != 0) &&
|
sZoFwork[ZO_BSF_29_Z]) != 0) &&
|
||||||
(sZoSwork[ZO_BSS_46] == 0)) {
|
(sZoSwork[ZO_BSS_46] == 0)) {
|
||||||
@ -3114,7 +3111,6 @@ void Zoness_ZoSarumarine_Update(ZoSarumarine* this) {
|
|||||||
sZoLimbTimers[sp124]--;
|
sZoLimbTimers[sp124]--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = ZO_BSS_49, sp124 = 0; sp124 < 6; sp124++, i++) {
|
for (i = ZO_BSS_49, sp124 = 0; sp124 < 6; sp124++, i++) {
|
||||||
if (sZoSwork[i] != 0) {
|
if (sZoSwork[i] != 0) {
|
||||||
sZoSwork[i]--;
|
sZoSwork[i]--;
|
||||||
@ -4702,7 +4698,6 @@ void Zoness_LevelStart(Player* player) {
|
|||||||
player->yBob = -SIN_DEG(player->bobPhase) * 0.5f;
|
player->yBob = -SIN_DEG(player->bobPhase) * 0.5f;
|
||||||
player->rockPhase += 3.0f;
|
player->rockPhase += 3.0f;
|
||||||
player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f;
|
player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f;
|
||||||
|
|
||||||
switch (player->csState) {
|
switch (player->csState) {
|
||||||
case 0:
|
case 0:
|
||||||
gCsFrameCount = 0;
|
gCsFrameCount = 0;
|
||||||
@ -4718,7 +4713,6 @@ void Zoness_LevelStart(Player* player) {
|
|||||||
case 1:
|
case 1:
|
||||||
Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 48.0f, 0);
|
Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 48.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.at.y, (player->pos.y * player->unk_148) + 20.0f, 0.1f, 1.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.y, (player->pos.y * player->unk_148) + 20.0f, 0.1f, 1.0f, 0.0f);
|
||||||
|
|
||||||
if (gCsFrameCount >= 230) {
|
if (gCsFrameCount >= 230) {
|
||||||
Math_SmoothStepToF(&player->cam.at.z, player->trueZpos, 0.2f, 20000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.z, player->trueZpos, 0.2f, 20000.0f, 0.0f);
|
||||||
}
|
}
|
||||||
@ -4780,7 +4774,6 @@ void Zoness_LevelComplete(Player* player) {
|
|||||||
gCsCamAtX = player->cam.at.x;
|
gCsCamAtX = player->cam.at.x;
|
||||||
gCsCamAtY = player->cam.at.y;
|
gCsCamAtY = player->cam.at.y;
|
||||||
gCsCamAtZ = player->cam.at.z;
|
gCsCamAtZ = player->cam.at.z;
|
||||||
|
|
||||||
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
|
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
|
||||||
if (gActors[i].animFrame == 0) {
|
if (gActors[i].animFrame == 0) {
|
||||||
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
|
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
|
||||||
@ -4842,7 +4835,6 @@ void Zoness_LevelComplete(Player* player) {
|
|||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
gPathTexScroll += 60.0f;
|
gPathTexScroll += 60.0f;
|
||||||
|
|
||||||
if (player->csTimer == 0) {
|
if (player->csTimer == 0) {
|
||||||
player->pos.x = 0.0f;
|
player->pos.x = 0.0f;
|
||||||
player->pos.y = 200.0f;
|
player->pos.y = 200.0f;
|
||||||
|
@ -658,7 +658,6 @@ void Fortuna_LevelComplete(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);
|
Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||||
Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f);
|
Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f);
|
||||||
|
|
||||||
if (gMissionStatus == MISSION_COMPLETE) {
|
if (gMissionStatus == MISSION_COMPLETE) {
|
||||||
if (player->pos.y < 700.0f) {
|
if (player->pos.y < 700.0f) {
|
||||||
Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f);
|
Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f);
|
||||||
@ -750,7 +749,6 @@ void Fortuna_LevelComplete(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->rot.x, 15.0f, 0.1f, 0.4f, 0.0f);
|
Math_SmoothStepToF(&player->rot.x, 15.0f, 0.1f, 0.4f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->rot.z, -40.0f, 0.2f, 5.0f, 0.0f);
|
Math_SmoothStepToF(&player->rot.z, -40.0f, 0.2f, 5.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->rot.y, -120.0f, 0.1f, 2.0f, 0.0f);
|
Math_SmoothStepToF(&player->rot.y, -120.0f, 0.1f, 2.0f, 0.0f);
|
||||||
|
|
||||||
player->baseSpeed += 1.0f;
|
player->baseSpeed += 1.0f;
|
||||||
if (player->baseSpeed >= 70.0f) {
|
if (player->baseSpeed >= 70.0f) {
|
||||||
player->baseSpeed = 70.0f;
|
player->baseSpeed = 70.0f;
|
||||||
@ -759,7 +757,6 @@ void Fortuna_LevelComplete(Player* player) {
|
|||||||
player->contrailScale = 0.6f;
|
player->contrailScale = 0.6f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->csTimer == 0) {
|
if (player->csTimer == 0) {
|
||||||
player->csState = 2;
|
player->csState = 2;
|
||||||
player->csTimer = 1000;
|
player->csTimer = 1000;
|
||||||
|
@ -5181,7 +5181,6 @@ void Macbeth_Actor207_Update(Actor207* this) {
|
|||||||
this->state = 8;
|
this->state = 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||||
if (gBossFrameCount == 0) {
|
if (gBossFrameCount == 0) {
|
||||||
Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY);
|
Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY);
|
||||||
@ -5745,7 +5744,6 @@ void Macbeth_801AD144(PlayerShot* shot) {
|
|||||||
sp8C.x = shot->obj.pos.x - actor->obj.pos.x;
|
sp8C.x = shot->obj.pos.x - actor->obj.pos.x;
|
||||||
sp8C.y = shot->obj.pos.y - actor->obj.pos.y;
|
sp8C.y = shot->obj.pos.y - actor->obj.pos.y;
|
||||||
sp8C.z = shot->obj.pos.z - actor->obj.pos.z;
|
sp8C.z = shot->obj.pos.z - actor->obj.pos.z;
|
||||||
|
|
||||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80);
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80);
|
||||||
|
|
||||||
test.x = (var_s1[4] + actor->obj.pos.x) - (actor->obj.pos.x + sp80.x);
|
test.x = (var_s1[4] + actor->obj.pos.x) - (actor->obj.pos.x + sp80.x);
|
||||||
@ -6369,7 +6367,6 @@ void Macbeth_801AF44C(void) {
|
|||||||
Actor_Initialize(actor);
|
Actor_Initialize(actor);
|
||||||
actor->obj.status = OBJ_INIT;
|
actor->obj.status = OBJ_INIT;
|
||||||
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
||||||
|
|
||||||
actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA7E4[4];
|
actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA7E4[4];
|
||||||
actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA7F8[4];
|
actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA7F8[4];
|
||||||
actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA80C[4];
|
actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA80C[4];
|
||||||
@ -6534,21 +6531,18 @@ void Macbeth_LevelComplete2(Player* player) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
player->csState++;
|
player->csState++;
|
||||||
|
|
||||||
gCsCamEyeX = -100.0f;
|
gCsCamEyeX = -100.0f;
|
||||||
gCsCamEyeY = 250.0f;
|
gCsCamEyeY = 250.0f;
|
||||||
gCsCamEyeZ = 2090.0f;
|
gCsCamEyeZ = 2090.0f;
|
||||||
gCsCamAtX = -250.0f;
|
gCsCamAtX = -250.0f;
|
||||||
gCsCamAtY = 10.0f;
|
gCsCamAtY = 10.0f;
|
||||||
gCsCamAtZ = -3210.0f;
|
gCsCamAtZ = -3210.0f;
|
||||||
|
|
||||||
player->cam.eye.x = -250.0f;
|
player->cam.eye.x = -250.0f;
|
||||||
player->cam.eye.y = 50.0f;
|
player->cam.eye.y = 50.0f;
|
||||||
player->cam.eye.z = 1580.0f;
|
player->cam.eye.z = 1580.0f;
|
||||||
player->cam.at.x = -250.0f;
|
player->cam.at.x = -250.0f;
|
||||||
player->cam.at.y = 10.0f;
|
player->cam.at.y = 10.0f;
|
||||||
player->cam.at.z = -3210.0f;
|
player->cam.at.z = -3210.0f;
|
||||||
|
|
||||||
D_i5_801BE312 = 1;
|
D_i5_801BE312 = 1;
|
||||||
|
|
||||||
player->pos.x = 500.0f;
|
player->pos.x = 500.0f;
|
||||||
@ -6667,19 +6661,16 @@ void Macbeth_LevelComplete2(Player* player) {
|
|||||||
D_ctx_80177A48[6] = 0.5f;
|
D_ctx_80177A48[6] = 0.5f;
|
||||||
D_ctx_80177A48[7] = 1560.0f;
|
D_ctx_80177A48[7] = 1560.0f;
|
||||||
D_ctx_80177A48[8] = 2400.0f;
|
D_ctx_80177A48[8] = 2400.0f;
|
||||||
|
|
||||||
player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x;
|
player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x;
|
||||||
player->cam.at.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + gPathProgress) - 2000.0f;
|
player->cam.at.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + gPathProgress) - 2000.0f;
|
||||||
player->cam.eye.y = gCsCamEyeY = 50.0f;
|
player->cam.eye.y = gCsCamEyeY = 50.0f;
|
||||||
player->cam.at.y = gCsCamAtY = 10.0f;
|
player->cam.at.y = gCsCamAtY = 10.0f;
|
||||||
player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX;
|
player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX;
|
||||||
player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ;
|
player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ;
|
||||||
|
|
||||||
player->pathChangeYaw = -30.0f;
|
player->pathChangeYaw = -30.0f;
|
||||||
player->xPathTarget = 10014.0f;
|
player->xPathTarget = 10014.0f;
|
||||||
player->pathChangeTimer = 1000;
|
player->pathChangeTimer = 1000;
|
||||||
player->pathStep = 0.0f;
|
player->pathStep = 0.0f;
|
||||||
|
|
||||||
gFillScreenAlphaTarget = 0;
|
gFillScreenAlphaTarget = 0;
|
||||||
gFillScreenAlphaStep = 127;
|
gFillScreenAlphaStep = 127;
|
||||||
}
|
}
|
||||||
@ -6715,12 +6706,10 @@ void Macbeth_LevelComplete2(Player* player) {
|
|||||||
gFogGreen -= 1;
|
gFogGreen -= 1;
|
||||||
gFogBlue -= 2;
|
gFogBlue -= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Math_SmoothStepToF(&player->zPathVel, 0.0f, 1.0f, 0.6f, 0.0f);
|
Math_SmoothStepToF(&player->zPathVel, 0.0f, 1.0f, 0.6f, 0.0f);
|
||||||
Math_SmoothStepToF(&gCsCamAtX, 11700.0f, 0.1f, 50.0f, 0.0f);
|
Math_SmoothStepToF(&gCsCamAtX, 11700.0f, 0.1f, 50.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&D_ctx_80177A48[5], 30.0f, 0.1f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&D_ctx_80177A48[5], 30.0f, 0.1f, 0.05f, 0.0f);
|
||||||
Math_SmoothStepToF(&gCsCamAtY, 1600.0f, 0.1f, D_ctx_80177A48[5], 0.0f);
|
Math_SmoothStepToF(&gCsCamAtY, 1600.0f, 0.1f, D_ctx_80177A48[5], 0.0f);
|
||||||
|
|
||||||
if (player->zPathVel >= 2.5f) {
|
if (player->zPathVel >= 2.5f) {
|
||||||
player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f;
|
player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f;
|
||||||
player->pos.z = player->trueZpos = -(gPathProgress + 210.0f);
|
player->pos.z = player->trueZpos = -(gPathProgress + 210.0f);
|
||||||
@ -6742,12 +6731,10 @@ void Macbeth_LevelComplete2(Player* player) {
|
|||||||
gActors[D_i5_801BE314].obj.pos.y + 30.0f,
|
gActors[D_i5_801BE314].obj.pos.y + 30.0f,
|
||||||
gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f);
|
gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->zPath += player->zPathVel;
|
player->zPath += player->zPathVel;
|
||||||
gPathVelZ = player->zPathVel;
|
gPathVelZ = player->zPathVel;
|
||||||
gPathProgress = player->zPath;
|
gPathProgress = player->zPath;
|
||||||
gPathTexScroll += player->zPathVel;
|
gPathTexScroll += player->zPathVel;
|
||||||
|
|
||||||
if (gCsFrameCount == 630) {
|
if (gCsFrameCount == 630) {
|
||||||
Audio_KillSfxBySourceAndId(gActors[D_i5_801BE314].sfxSource, NA_SE_EN_TRAIN_BREAK);
|
Audio_KillSfxBySourceAndId(gActors[D_i5_801BE314].sfxSource, NA_SE_EN_TRAIN_BREAK);
|
||||||
AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, gActors[D_i5_801BE314].sfxSource, 4);
|
AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, gActors[D_i5_801BE314].sfxSource, 4);
|
||||||
@ -7202,7 +7189,6 @@ void Macbeth_LevelComplete2(Player* player) {
|
|||||||
} else {
|
} else {
|
||||||
Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f);
|
Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0);
|
||||||
@ -7480,7 +7466,6 @@ void Macbeth_801B3718(void) {
|
|||||||
Actor_Initialize(actor);
|
Actor_Initialize(actor);
|
||||||
actor->obj.status = OBJ_INIT;
|
actor->obj.status = OBJ_INIT;
|
||||||
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
||||||
|
|
||||||
actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA8B4[4];
|
actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA8B4[4];
|
||||||
actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA8C8[4];
|
actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA8C8[4];
|
||||||
actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA8DC[4];
|
actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA8DC[4];
|
||||||
@ -7582,7 +7567,6 @@ void Macbeth_LevelComplete1(Player* player) {
|
|||||||
gCsCamEyeX = player->pos.x;
|
gCsCamEyeX = player->pos.x;
|
||||||
gCsCamEyeY = player->pos.y;
|
gCsCamEyeY = player->pos.y;
|
||||||
gCsCamEyeZ = player->pos.z + player->zPath + 50.0f;
|
gCsCamEyeZ = player->pos.z + player->zPath + 50.0f;
|
||||||
|
|
||||||
switch (player->csState) {
|
switch (player->csState) {
|
||||||
case 0:
|
case 0:
|
||||||
gCsFrameCount = gBossActive = gLoadLevelObjects = 1;
|
gCsFrameCount = gBossActive = gLoadLevelObjects = 1;
|
||||||
@ -7598,7 +7582,6 @@ void Macbeth_LevelComplete1(Player* player) {
|
|||||||
gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9] = 0;
|
gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9] = 0;
|
||||||
|
|
||||||
D_ctx_80177A48[0] = 0.0f;
|
D_ctx_80177A48[0] = 0.0f;
|
||||||
|
|
||||||
player->csState++;
|
player->csState++;
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
@ -7621,7 +7604,6 @@ void Macbeth_LevelComplete1(Player* player) {
|
|||||||
gCsCamAtX = player->pos.x;
|
gCsCamAtX = player->pos.x;
|
||||||
gCsCamAtY = player->pos.y + 30.0f;
|
gCsCamAtY = player->pos.y + 30.0f;
|
||||||
gCsCamAtZ = player->pos.z + player->zPath;
|
gCsCamAtZ = player->pos.z + player->zPath;
|
||||||
|
|
||||||
gFillScreenRed = 255;
|
gFillScreenRed = 255;
|
||||||
gFillScreenGreen = 255;
|
gFillScreenGreen = 255;
|
||||||
gFillScreenBlue = 255;
|
gFillScreenBlue = 255;
|
||||||
@ -7682,7 +7664,6 @@ void Macbeth_LevelComplete1(Player* player) {
|
|||||||
func_tank_80044868(player);
|
func_tank_80044868(player);
|
||||||
func_tank_80045678(player);
|
func_tank_80045678(player);
|
||||||
func_tank_80045E7C(player);
|
func_tank_80045E7C(player);
|
||||||
|
|
||||||
Player_CollisionCheck(player);
|
Player_CollisionCheck(player);
|
||||||
Player_UpdatePath(player);
|
Player_UpdatePath(player);
|
||||||
break;
|
break;
|
||||||
@ -7725,7 +7706,6 @@ void Macbeth_LevelComplete1(Player* player) {
|
|||||||
func_tank_80044868(player);
|
func_tank_80044868(player);
|
||||||
func_tank_80045678(player);
|
func_tank_80045678(player);
|
||||||
func_tank_80045E7C(player);
|
func_tank_80045E7C(player);
|
||||||
|
|
||||||
Player_CollisionCheck(player);
|
Player_CollisionCheck(player);
|
||||||
Player_UpdatePath(player);
|
Player_UpdatePath(player);
|
||||||
break;
|
break;
|
||||||
@ -7865,7 +7845,6 @@ void Macbeth_LevelComplete1(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f);
|
||||||
|
|
||||||
player->cam.at.y += zeroVar;
|
player->cam.at.y += zeroVar;
|
||||||
|
|
||||||
if ((gCsFrameCount >= 850) && ((gGameFrameCount % 16) == 0)) {
|
if ((gCsFrameCount >= 850) && ((gGameFrameCount % 16) == 0)) {
|
||||||
|
@ -2299,7 +2299,6 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
rot->z += D_i5_801BBEF4[66];
|
rot->z += D_i5_801BBEF4[66];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY);
|
Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY);
|
||||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
||||||
@ -2313,7 +2312,6 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
case 3:
|
case 3:
|
||||||
case 7:
|
case 7:
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
||||||
|
|
||||||
if ((D_i5_801BBEF0[30] % 2) != 0) {
|
if ((D_i5_801BBEF0[30] % 2) != 0) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||||
} else {
|
} else {
|
||||||
@ -2330,7 +2328,6 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
case 10:
|
case 10:
|
||||||
case 11:
|
case 11:
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_61);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_61);
|
||||||
|
|
||||||
if ((D_i5_801BBEF0[30] % 2) != 0) {
|
if ((D_i5_801BBEF0[30] % 2) != 0) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||||
} else {
|
} else {
|
||||||
@ -2342,7 +2339,6 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
if (*dList != NULL) {
|
if (*dList != NULL) {
|
||||||
gSPDisplayList(gMasterDisp++, *dList);
|
gSPDisplayList(gMasterDisp++, *dList);
|
||||||
}
|
}
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2604,7 +2600,6 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
rot->z += SIN_DEG((D_i5_801BBEF0[34] / (f32) D_i5_801BBEF0[36]) * 360.0f) * sp24;
|
rot->z += SIN_DEG((D_i5_801BBEF0[34] / (f32) D_i5_801BBEF0[36]) * 360.0f) * sp24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY);
|
Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY);
|
||||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
||||||
@ -2616,7 +2611,6 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
||||||
|
|
||||||
if ((sp20 % 2) != 0) {
|
if ((sp20 % 2) != 0) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||||
} else {
|
} else {
|
||||||
@ -2633,7 +2627,6 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
case 5:
|
case 5:
|
||||||
case 6:
|
case 6:
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_61);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_61);
|
||||||
|
|
||||||
if ((sp20 % 2) != 0) {
|
if ((sp20 % 2) != 0) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||||
} else {
|
} else {
|
||||||
@ -2645,7 +2638,6 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
if (*dList != NULL) {
|
if (*dList != NULL) {
|
||||||
gSPDisplayList(gMasterDisp++, *dList);
|
gSPDisplayList(gMasterDisp++, *dList);
|
||||||
}
|
}
|
||||||
|
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2969,7 +2961,6 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
|
|
||||||
@ -3398,7 +3389,6 @@ void Titania_80192118(TiGoras* this) {
|
|||||||
Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, 0.5f, 360.0f, 0.01f);
|
Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, 0.5f, 360.0f, 0.01f);
|
||||||
Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, 0.5f, 360.0f, 0.01f);
|
Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, 0.5f, 360.0f, 0.01f);
|
||||||
Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, 0.5f, 5.0f, 0.01f);
|
Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, 0.5f, 5.0f, 0.01f);
|
||||||
|
|
||||||
D_i5_801BBEF0[24]++;
|
D_i5_801BBEF0[24]++;
|
||||||
D_i5_801BBEF0[22]++;
|
D_i5_801BBEF0[22]++;
|
||||||
D_i5_801BBEF0[23]++;
|
D_i5_801BBEF0[23]++;
|
||||||
@ -4992,7 +4982,6 @@ void Titania_TiGoras_Update(Boss* boss) {
|
|||||||
AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4);
|
AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4);
|
||||||
boss->dmgType = DMG_NONE;
|
boss->dmgType = DMG_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gPlayer[0].grounded != 0) && (boss->swork[39] > 0)) {
|
if ((gPlayer[0].grounded != 0) && (boss->swork[39] > 0)) {
|
||||||
gControllerRumbleFlags[0] = 1;
|
gControllerRumbleFlags[0] = 1;
|
||||||
boss->swork[39]--;
|
boss->swork[39]--;
|
||||||
@ -5334,7 +5323,6 @@ void Titania_TiGoras_Draw(TiGoras* boss) {
|
|||||||
}
|
}
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19], MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19], MTXF_APPLY);
|
||||||
|
|
||||||
if (D_i5_801BBEF0[7] != 0) {
|
if (D_i5_801BBEF0[7] != 0) {
|
||||||
@ -5371,7 +5359,6 @@ void Titania_TiGoras_Draw(TiGoras* boss) {
|
|||||||
MTXF_APPLY);
|
MTXF_APPLY);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178);
|
||||||
gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0);
|
gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0);
|
||||||
gSPDisplayList(gMasterDisp++, D_TI2_7005300);
|
gSPDisplayList(gMasterDisp++, D_TI2_7005300);
|
||||||
@ -5402,17 +5389,14 @@ void Titania_TiGoras_Draw(TiGoras* boss) {
|
|||||||
if (boss->swork[25] != 0) {
|
if (boss->swork[25] != 0) {
|
||||||
sp120 = boss->fwork[41] / 40.0f;
|
sp120 = boss->fwork[41] / 40.0f;
|
||||||
temp_fs2 = boss->fwork[42] / 700.0f;
|
temp_fs2 = boss->fwork[42] / 700.0f;
|
||||||
|
|
||||||
Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR,
|
Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR,
|
||||||
MTXF_APPLY);
|
MTXF_APPLY);
|
||||||
|
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, MTXF_APPLY);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_72);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_72);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178);
|
||||||
gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0);
|
gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0);
|
||||||
gSPDisplayList(gMasterDisp++, D_TI_8000D90);
|
gSPDisplayList(gMasterDisp++, D_TI_8000D90);
|
||||||
@ -5443,20 +5427,17 @@ void Titania_TiGoras_Draw(TiGoras* boss) {
|
|||||||
spF4.z = boss->fwork[42];
|
spF4.z = boss->fwork[42];
|
||||||
|
|
||||||
Matrix_MultVec3f(gCalcMatrix, &spF4, &spE8);
|
Matrix_MultVec3f(gCalcMatrix, &spF4, &spE8);
|
||||||
|
|
||||||
gTexturedLines[temp_v1_28].posAA.x = temp_fs0;
|
gTexturedLines[temp_v1_28].posAA.x = temp_fs0;
|
||||||
gTexturedLines[temp_v1_28].posAA.y = temp_fs1;
|
gTexturedLines[temp_v1_28].posAA.y = temp_fs1;
|
||||||
gTexturedLines[temp_v1_28].posAA.z = temp_fs2;
|
gTexturedLines[temp_v1_28].posAA.z = temp_fs2;
|
||||||
gTexturedLines[temp_v1_28].posBB.x = temp_fs0 + spE8.x;
|
gTexturedLines[temp_v1_28].posBB.x = temp_fs0 + spE8.x;
|
||||||
gTexturedLines[temp_v1_28].posBB.y = temp_fs1 + spE8.y;
|
gTexturedLines[temp_v1_28].posBB.y = temp_fs1 + spE8.y;
|
||||||
gTexturedLines[temp_v1_28].posBB.z = temp_fs2 + spE8.z;
|
gTexturedLines[temp_v1_28].posBB.z = temp_fs2 + spE8.z;
|
||||||
|
|
||||||
if (boss->swork[32] == 0) {
|
if (boss->swork[32] == 0) {
|
||||||
gTexturedLines[temp_v1_28].mode = 0;
|
gTexturedLines[temp_v1_28].mode = 0;
|
||||||
} else {
|
} else {
|
||||||
gTexturedLines[temp_v1_28].mode = 1;
|
gTexturedLines[temp_v1_28].mode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTexturedLines[temp_v1_28].prim.r = 0;
|
gTexturedLines[temp_v1_28].prim.r = 0;
|
||||||
gTexturedLines[temp_v1_28].prim.b = 0;
|
gTexturedLines[temp_v1_28].prim.b = 0;
|
||||||
gTexturedLines[temp_v1_28].prim.g = 0;
|
gTexturedLines[temp_v1_28].prim.g = 0;
|
||||||
@ -5560,7 +5541,6 @@ void Titania_801990DC(TiGoras* this) {
|
|||||||
actor->obj.pos.x = gPlayer[0].pos.x;
|
actor->obj.pos.x = gPlayer[0].pos.x;
|
||||||
actor->obj.pos.y = 500.0f;
|
actor->obj.pos.y = 500.0f;
|
||||||
actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4];
|
actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4];
|
||||||
|
|
||||||
actor->obj.rot.y = (RAND_FLOAT(5.0f) + 90.0f) - 2.5f;
|
actor->obj.rot.y = (RAND_FLOAT(5.0f) + 90.0f) - 2.5f;
|
||||||
actor->obj.rot.z = (RAND_FLOAT(5.0f) + 180.0f) - 2.5f;
|
actor->obj.rot.z = (RAND_FLOAT(5.0f) + 180.0f) - 2.5f;
|
||||||
|
|
||||||
@ -5589,7 +5569,6 @@ void Titania_801990DC(TiGoras* this) {
|
|||||||
actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3];
|
actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3];
|
||||||
actor->obj.pos.y = 500.0f;
|
actor->obj.pos.y = 500.0f;
|
||||||
actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4];
|
actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4];
|
||||||
|
|
||||||
actor->obj.rot.z = 90.0f;
|
actor->obj.rot.z = 90.0f;
|
||||||
actor->vel.y = -10.0f;
|
actor->vel.y = -10.0f;
|
||||||
actor->gravity = 0.8f;
|
actor->gravity = 0.8f;
|
||||||
@ -5616,7 +5595,6 @@ void Titania_801990DC(TiGoras* this) {
|
|||||||
actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3];
|
actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3];
|
||||||
actor->obj.pos.y = 500.0f;
|
actor->obj.pos.y = 500.0f;
|
||||||
actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4];
|
actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4];
|
||||||
|
|
||||||
actor->obj.rot.z = 90.0f;
|
actor->obj.rot.z = 90.0f;
|
||||||
actor->vel.y = -10.0f;
|
actor->vel.y = -10.0f;
|
||||||
actor->gravity = 0.8f;
|
actor->gravity = 0.8f;
|
||||||
|
@ -1138,7 +1138,6 @@ void Andross_AndBrain_Update(AndBrain* this) {
|
|||||||
|
|
||||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp58);
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp58);
|
||||||
Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_APPLY);
|
Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_APPLY);
|
||||||
|
|
||||||
vec.x = RAND_FLOAT(50.0f) + 120.0f;
|
vec.x = RAND_FLOAT(50.0f) + 120.0f;
|
||||||
vec.y = 0.0f;
|
vec.y = 0.0f;
|
||||||
vec.z = 0.0f;
|
vec.z = 0.0f;
|
||||||
@ -1261,7 +1260,6 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
if (*dList != NULL) {
|
if (*dList != NULL) {
|
||||||
Matrix_Push(&gGfxMatrix);
|
Matrix_Push(&gGfxMatrix);
|
||||||
Matrix_Push(&gCalcMatrix);
|
Matrix_Push(&gCalcMatrix);
|
||||||
@ -3307,7 +3305,6 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
gSPDisplayList(gMasterDisp++, *dList);
|
gSPDisplayList(gMasterDisp++, *dList);
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
||||||
|
|
||||||
switch (gGameFrameCount % 4U) {
|
switch (gGameFrameCount % 4U) {
|
||||||
case 0:
|
case 0:
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||||
@ -3322,7 +3319,6 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Translate(gGfxMatrix, D_i6_801A67DC.x, D_i6_801A67DC.y, D_i6_801A67DC.z, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, D_i6_801A67DC.x, D_i6_801A67DC.y, D_i6_801A67DC.z, MTXF_APPLY);
|
||||||
Matrix_RotateZ(gGfxMatrix, D_i6_801A67F0 * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, D_i6_801A67F0 * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateY(gGfxMatrix, D_i6_801A67EC * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gGfxMatrix, D_i6_801A67EC * M_DTOR, MTXF_APPLY);
|
||||||
@ -3352,7 +3348,6 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
gSPDisplayList(gMasterDisp++, *dList);
|
gSPDisplayList(gMasterDisp++, *dList);
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
||||||
|
|
||||||
switch (gGameFrameCount % 4U) {
|
switch (gGameFrameCount % 4U) {
|
||||||
case 0:
|
case 0:
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||||
@ -3367,7 +3362,6 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
|
|||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Translate(gGfxMatrix, D_i6_801A67C4.x, D_i6_801A67C4.y, D_i6_801A67C4.z, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, D_i6_801A67C4.x, D_i6_801A67C4.y, D_i6_801A67C4.z, MTXF_APPLY);
|
||||||
Matrix_RotateZ(gGfxMatrix, D_i6_801A67D8 * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, D_i6_801A67D8 * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateY(gGfxMatrix, D_i6_801A67D4 * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gGfxMatrix, D_i6_801A67D4 * M_DTOR, MTXF_APPLY);
|
||||||
@ -3814,7 +3808,6 @@ void Andross_80193AE4(s32 actorIndex) {
|
|||||||
Actor_Initialize(actor);
|
Actor_Initialize(actor);
|
||||||
actor->obj.status = OBJ_ACTIVE;
|
actor->obj.status = OBJ_ACTIVE;
|
||||||
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
||||||
|
|
||||||
actor->obj.pos.x = D_i6_801A6878[actorIndex].x;
|
actor->obj.pos.x = D_i6_801A6878[actorIndex].x;
|
||||||
actor->obj.pos.y = D_i6_801A6878[actorIndex].y;
|
actor->obj.pos.y = D_i6_801A6878[actorIndex].y;
|
||||||
actor->obj.pos.z = D_i6_801A6878[actorIndex].z;
|
actor->obj.pos.z = D_i6_801A6878[actorIndex].z;
|
||||||
@ -3882,7 +3875,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->vel.y, 0.0f, 1.0f, 3.0f, 0.0f);
|
Math_SmoothStepToF(&player->vel.y, 0.0f, 1.0f, 3.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.x, player->pos.x, 0.1f, 15.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.x, player->pos.x, 0.1f, 15.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f);
|
||||||
|
|
||||||
if (player->csTimer == 0) {
|
if (player->csTimer == 0) {
|
||||||
player->pos.y += SIN_DEG(player->rot.x) * 15.0f;
|
player->pos.y += SIN_DEG(player->rot.x) * 15.0f;
|
||||||
Math_SmoothStepToF(&player->rot.x, 180.0f, 0.1f, 5.0f, 0.0f);
|
Math_SmoothStepToF(&player->rot.x, 180.0f, 0.1f, 5.0f, 0.0f);
|
||||||
@ -3965,7 +3957,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
|
|
||||||
Math_SmoothStepToF(&D_ctx_80177A48[5], 3.0f, 1.0f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&D_ctx_80177A48[5], 3.0f, 1.0f, 0.05f, 0.0f);
|
||||||
player->cam.eye.z += player->vel.z * D_ctx_80177A48[2];
|
player->cam.eye.z += player->vel.z * D_ctx_80177A48[2];
|
||||||
|
|
||||||
if (gCsFrameCount > 230) {
|
if (gCsFrameCount > 230) {
|
||||||
player->camDist -= 7.0f;
|
player->camDist -= 7.0f;
|
||||||
}
|
}
|
||||||
@ -3988,7 +3979,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
gCsCamAtX = player->pos.x;
|
gCsCamAtX = player->pos.x;
|
||||||
gCsCamAtY = player->pos.y;
|
gCsCamAtY = player->pos.y;
|
||||||
gCsCamAtZ = player->trueZpos + gPathProgress;
|
gCsCamAtZ = player->trueZpos + gPathProgress;
|
||||||
|
|
||||||
if (gCsFrameCount > 200) {
|
if (gCsFrameCount > 200) {
|
||||||
player->contrailScale += 0.03f;
|
player->contrailScale += 0.03f;
|
||||||
if (player->contrailScale > 0.6f) {
|
if (player->contrailScale > 0.6f) {
|
||||||
@ -4121,7 +4111,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
player->camRoll += D_ctx_80177A48[3];
|
player->camRoll += D_ctx_80177A48[3];
|
||||||
|
|
||||||
if (gCsFrameCount > 190) {
|
if (gCsFrameCount > 190) {
|
||||||
Math_SmoothStepToF(&D_ctx_80177A48[3], 0.3f, 0.05f, 0.02f, 0.0f);
|
Math_SmoothStepToF(&D_ctx_80177A48[3], 0.3f, 0.05f, 0.02f, 0.0f);
|
||||||
}
|
}
|
||||||
@ -4217,7 +4206,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
if (player->csTimer == 1) {
|
if (player->csTimer == 1) {
|
||||||
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
|
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gVenomHardClear != 0) {
|
if (gVenomHardClear != 0) {
|
||||||
if (gCsFrameCount >= 1000) {
|
if (gCsFrameCount >= 1000) {
|
||||||
gCsCamAtX += D_ctx_80177A48[4] * 0.15f;
|
gCsCamAtX += D_ctx_80177A48[4] * 0.15f;
|
||||||
@ -4287,7 +4275,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0);
|
||||||
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0);
|
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gVenomHardClear != 0) {
|
if (gVenomHardClear != 0) {
|
||||||
switch (gCsFrameCount) {
|
switch (gCsFrameCount) {
|
||||||
case 400:
|
case 400:
|
||||||
@ -4374,7 +4361,6 @@ void Andross_80193C4C(Player* player) {
|
|||||||
player->vel.x = sp68.x;
|
player->vel.x = sp68.x;
|
||||||
player->vel.z = sp68.z;
|
player->vel.z = sp68.z;
|
||||||
player->vel.y = sp68.y;
|
player->vel.y = sp68.y;
|
||||||
|
|
||||||
if (player->csTimer == 0) {
|
if (player->csTimer == 0) {
|
||||||
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
|
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
|
||||||
player->unk_014 = 0.2f;
|
player->unk_014 = 0.2f;
|
||||||
|
@ -3405,14 +3405,12 @@ void SectorY_801A0AC0(Player* player) {
|
|||||||
player->csState = 0;
|
player->csState = 0;
|
||||||
player->csTimer = 0;
|
player->csTimer = 0;
|
||||||
player->csEventTimer = 0;
|
player->csEventTimer = 0;
|
||||||
|
|
||||||
gCsCamEyeX = player->pos.x;
|
gCsCamEyeX = player->pos.x;
|
||||||
gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f;
|
gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f;
|
||||||
gCsCamEyeZ = 400.0f;
|
gCsCamEyeZ = 400.0f;
|
||||||
gCsCamAtX = player->pos.x;
|
gCsCamAtX = player->pos.x;
|
||||||
gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f;
|
gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f;
|
||||||
gCsCamAtZ = player->trueZpos;
|
gCsCamAtZ = player->trueZpos;
|
||||||
|
|
||||||
player->cam.eye.x = player->pos.x;
|
player->cam.eye.x = player->pos.x;
|
||||||
player->cam.eye.y = player->pos.y * player->unk_148;
|
player->cam.eye.y = player->pos.y * player->unk_148;
|
||||||
player->cam.eye.y += 50.0f;
|
player->cam.eye.y += 50.0f;
|
||||||
|
@ -261,13 +261,11 @@ void Turret_Draw(Player* player) {
|
|||||||
Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, MTXF_APPLY);
|
||||||
Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY);
|
Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
if (player->turretState < 2) {
|
if (player->turretState < 2) {
|
||||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->turretRecoil * 25), MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->turretRecoil * 25), MTXF_APPLY);
|
||||||
} else {
|
} else {
|
||||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f, MTXF_APPLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix_Scale(gGfxMatrix, 12.0f, 12.0f, 1.0f, MTXF_APPLY);
|
Matrix_Scale(gGfxMatrix, 12.0f, 12.0f, 1.0f, MTXF_APPLY);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
|
@ -110,7 +110,6 @@ void Venom2_UpdateEvents(ActorAllRange* this) {
|
|||||||
(gActors[7].obj.status == OBJ_FREE) && (this->timer_0BE == 0)) {
|
(gActors[7].obj.status == OBJ_FREE) && (this->timer_0BE == 0)) {
|
||||||
this->timer_0BE = 80;
|
this->timer_0BE = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
if ((this->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||||
for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) {
|
for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) {
|
||||||
gPrevPlanetTeamShields[i] = gSavedTeamShields[i];
|
gPrevPlanetTeamShields[i] = gSavedTeamShields[i];
|
||||||
@ -138,7 +137,6 @@ void Venom2_UpdateEvents(ActorAllRange* this) {
|
|||||||
player->cam.eye.y += wolf->vel.y * 0.23f;
|
player->cam.eye.y += wolf->vel.y * 0.23f;
|
||||||
player->cam.eye.z += wolf->vel.z * 0.23f;
|
player->cam.eye.z += wolf->vel.z * 0.23f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Math_SmoothStepToF(&player->cam.at.x, wolf->obj.pos.x, 1.0f, 20000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.x, wolf->obj.pos.x, 1.0f, 20000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.y, wolf->obj.pos.y, 1.0f, 20000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.y, wolf->obj.pos.y, 1.0f, 20000.0f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->cam.at.z, wolf->obj.pos.z, 1.0f, 20000.0f, 0.0f);
|
Math_SmoothStepToF(&player->cam.at.z, wolf->obj.pos.z, 1.0f, 20000.0f, 0.0f);
|
||||||
@ -334,7 +332,6 @@ void Venom2_LevelComplete(Player* player) {
|
|||||||
D_ctx_80177A48[5] = sp58.x;
|
D_ctx_80177A48[5] = sp58.x;
|
||||||
D_ctx_80177A48[6] = sp58.z;
|
D_ctx_80177A48[6] = sp58.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gLevelPhase == 2) {
|
if (gLevelPhase == 2) {
|
||||||
player->csEventTimer = 240;
|
player->csEventTimer = 240;
|
||||||
} else {
|
} else {
|
||||||
@ -352,7 +349,6 @@ void Venom2_LevelComplete(Player* player) {
|
|||||||
|
|
||||||
Math_SmoothStepToF(&D_ctx_80177A48[1], 0.8f, 1.0f, 0.05f, 0.0f);
|
Math_SmoothStepToF(&D_ctx_80177A48[1], 0.8f, 1.0f, 0.05f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);
|
Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f);
|
||||||
|
|
||||||
if (player->csTimer == 1) {
|
if (player->csTimer == 1) {
|
||||||
D_ctx_80177A48[4] = 0.0f;
|
D_ctx_80177A48[4] = 0.0f;
|
||||||
}
|
}
|
||||||
@ -371,7 +367,6 @@ void Venom2_LevelComplete(Player* player) {
|
|||||||
Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 1.0f, 0.1f, 0.0f);
|
Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 1.0f, 0.1f, 0.0f);
|
||||||
Matrix_RotateX(gCalcMatrix, -(D_PI / 9), MTXF_NEW);
|
Matrix_RotateX(gCalcMatrix, -(D_PI / 9), MTXF_NEW);
|
||||||
Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->yRot_114) * M_DTOR, MTXF_APPLY);
|
Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->yRot_114) * M_DTOR, MTXF_APPLY);
|
||||||
|
|
||||||
D_ctx_80177A48[3] += 1.0f;
|
D_ctx_80177A48[3] += 1.0f;
|
||||||
|
|
||||||
sp64.x = 0.0f;
|
sp64.x = 0.0f;
|
||||||
@ -386,7 +381,6 @@ void Venom2_LevelComplete(Player* player) {
|
|||||||
|
|
||||||
Math_SmoothStepToF(D_ctx_80177A48, 0.5f, 1.0f, 0.01f, 0.0f);
|
Math_SmoothStepToF(D_ctx_80177A48, 0.5f, 1.0f, 0.01f, 0.0f);
|
||||||
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||||
|
|
||||||
if ((player->csTimer == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) {
|
if ((player->csTimer == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) {
|
||||||
player->csState++;
|
player->csState++;
|
||||||
D_ctx_80177A48[2] = 0.75f;
|
D_ctx_80177A48[2] = 0.75f;
|
||||||
@ -446,7 +440,6 @@ void Venom2_LevelComplete(Player* player) {
|
|||||||
|
|
||||||
gNextGameState = GSTATE_PLAY;
|
gNextGameState = GSTATE_PLAY;
|
||||||
gNextLevel = LEVEL_VENOM_ANDROSS;
|
gNextLevel = LEVEL_VENOM_ANDROSS;
|
||||||
|
|
||||||
if (gLeveLClearStatus[gCurrentLevel] != 0) {
|
if (gLeveLClearStatus[gCurrentLevel] != 0) {
|
||||||
gNextLevelPhase = 1;
|
gNextLevelPhase = 1;
|
||||||
}
|
}
|
||||||
@ -463,7 +456,6 @@ void Venom2_LevelComplete(Player* player) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->csEventTimer == 150) {
|
if (player->csEventTimer == 150) {
|
||||||
Radio_PlayMessage(gMsg_ID_8215, RCID_FOX);
|
Radio_PlayMessage(gMsg_ID_8215, RCID_FOX);
|
||||||
AUDIO_PLAY_BGM(NA_BGM_DASH_INTO_BASE);
|
AUDIO_PLAY_BGM(NA_BGM_DASH_INTO_BASE);
|
||||||
|
@ -4094,7 +4094,7 @@ bool Map_LevelPlayedStatus_Check(PlanetId planet) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVarGetInteger("gLevelSelector", 0) && gCurrentPlanet == 6) {
|
if (CVarGetInteger("gLevelSelector", 0) && gMissionNumber == 6) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5384,7 +5384,7 @@ void Map_801A9A8C(void) {
|
|||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_83);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_83);
|
||||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||||
|
|
||||||
if (CVarGetInteger("gLevelSelector", 0) && gCurrentPlanet == 6) {
|
if (CVarGetInteger("gLevelSelector", 0) && gMissionNumber == 6) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1648,7 +1648,7 @@ void Option_ExpertSound_Setup(void) {
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "../../mods/sfxjukebox.c"
|
#include "../../mods/sfxjukebox2.c"
|
||||||
|
|
||||||
// Expert Sound Options
|
// Expert Sound Options
|
||||||
void Option_ExpertSound_Update(void) {
|
void Option_ExpertSound_Update(void) {
|
||||||
@ -1656,9 +1656,14 @@ void Option_ExpertSound_Update(void) {
|
|||||||
f32 sp28 = D_menu_801B931C;
|
f32 sp28 = D_menu_801B931C;
|
||||||
|
|
||||||
if (CVarGetInteger("gSfxJukebox", 0) == 1) {
|
if (CVarGetInteger("gSfxJukebox", 0) == 1) {
|
||||||
Option_JukeboxSoundUpdate();
|
if (gControllerPress[gMainController].button & L_TRIG) {
|
||||||
|
showJukebox ^= 1;
|
||||||
|
}
|
||||||
|
if (showJukebox) {
|
||||||
|
Jukebox_Update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Option_Input_Sound_X(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) {
|
if (Option_Input_Sound_X(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) {
|
||||||
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
|
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
|
||||||
|
@ -115,7 +115,6 @@ void Audio_ThreadEntry(void* arg0) {
|
|||||||
osWritebackDCacheAll();
|
osWritebackDCacheAll();
|
||||||
osSendMesg(&gTaskMesgQueue, OS_MESG_PTR(task), OS_MESG_PRI_NORMAL);
|
osSendMesg(&gTaskMesgQueue, OS_MESG_PTR(task), OS_MESG_PRI_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
task = AudioThread_CreateTask();
|
task = AudioThread_CreateTask();
|
||||||
if (task != NULL) {
|
if (task != NULL) {
|
||||||
@ -124,7 +123,6 @@ void Audio_ThreadEntry(void* arg0) {
|
|||||||
osWritebackDCacheAll();
|
osWritebackDCacheAll();
|
||||||
}
|
}
|
||||||
MQ_GET_MESG(&gAudioTaskMesgQueue, NULL);
|
MQ_GET_MESG(&gAudioTaskMesgQueue, NULL);
|
||||||
|
|
||||||
if (task != NULL) {
|
if (task != NULL) {
|
||||||
osSendMesg(&gTaskMsgQueue, OS_MESG_PTR(task), OS_MESG_PRI_NORMAL);
|
osSendMesg(&gTaskMsgQueue, OS_MESG_PTR(task), OS_MESG_PRI_NORMAL);
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
dir: overlays/ovl_i5
|
dir: overlays/ovl_i5
|
||||||
start: 0xE6A810
|
start: 0xE6A810
|
||||||
vram: 0x80187520
|
vram: 0x80187520
|
||||||
follows_vram: ast_radio
|
# follows_vram: ast_radio
|
||||||
bss_size: 0xAF80
|
bss_size: 0xAF80
|
||||||
symbol_name_format: i5_$VRAM
|
symbol_name_format: i5_$VRAM
|
||||||
subsegments:
|
subsegments:
|
||||||
|
Loading…
Reference in New Issue
Block a user