Docs update, added list of all SFX Ids used in the game. (#217)

* docs

* format

* format plz

* stuff

* more stuff

* more names and such

* torch update
This commit is contained in:
petrie911
2024-04-20 14:18:31 -05:00
committed by GitHub
parent 1272524325
commit b3929bea72
59 changed files with 1307 additions and 917 deletions
+66 -65
View File
@@ -171,7 +171,7 @@ void AllRange_GreatFoxRepair(Player* player) {
switch (player->unk_1D0) {
case 0:
player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->unk_2BC = player->unk_2B4 =
player->unk_4DC = gCsFrameCount = 0;
player->somersault = gCsFrameCount = 0;
player->unk_130 = player->camRoll = player->unk_110 = player->unk_08C = player->unk_0D8.x =
player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f;
gCsCamEyeX = 1673.0f;
@@ -376,7 +376,7 @@ void func_360_8002EE64(Actor* this) {
}
}
void func_360_8002F180(void) {
void ActorAllRange_SpawnTeam(void) {
Actor* actor;
s32 i;
s32 temp = 4;
@@ -423,7 +423,7 @@ void func_360_8002F180(void) {
}
}
void func_360_8002F3E0(void) {
void ActorAllRange_SpawnStarWolf(void) {
Actor* actor;
s32 i;
@@ -490,7 +490,7 @@ void func_360_8002F69C(Actor* actor) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30);
}
if (gAllRangeEventTimer == D_360_800C9B4C) {
func_360_8002F3E0();
ActorAllRange_SpawnStarWolf();
actor->state = 3;
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY;
if ((gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_BOLSE)) {
@@ -516,13 +516,13 @@ void func_360_8002F69C(Actor* actor) {
if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->state == 2) && (otherActor->health < 70) &&
(otherActor->timer_0C6 != 0) && (otherActor->unk_0D4 == 1)) {
if ((gActors[otherActor->aiIndex].state == STATE360_3) &&
(gActors[otherActor->aiIndex].aiType < AI360_KATT)) {
(gActors[otherActor->aiIndex].aiType <= AI360_ANDREW)) {
gActors[otherActor->aiIndex].iwork[2] = AI360_FOX;
gActors[otherActor->aiIndex].state = 2;
gActors[otherActor->aiIndex].aiIndex = otherActor->aiType;
if (D_display_800CA234 == &gActors[otherActor->aiIndex]) {
D_display_800CA234 = NULL;
D_display_Timer_800CA238 = 0;
if (gTeamHelpActor == &gActors[otherActor->aiIndex]) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
}
if (gActors[otherActor->aiIndex].iwork[3] == 0) {
switch (gActors[otherActor->aiIndex].aiType) {
@@ -609,9 +609,9 @@ void func_360_8002FC00(Actor* actor) {
func_360_8002FB4C(&gActors[otherActor->aiIndex]);
if ((otherActor->iwork[5] != 0) && (otherActor->unk_0D4 == 1) &&
(gActors[otherActor->aiIndex].iwork[3] == 0)) {
if (D_display_800CA234 == &gActors[otherActor->aiIndex]) {
D_display_800CA234 = NULL;
D_display_Timer_800CA238 = 0;
if (gTeamHelpActor == &gActors[otherActor->aiIndex]) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
}
switch (gActors[otherActor->aiIndex].aiType) {
case AI360_FALCO:
@@ -1123,9 +1123,9 @@ void ActorAllRange_ApplyDamage(Actor* this) {
} else {
Radio_PlayMessage(gMsg_ID_9151, RCID_FALCO);
}
if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiType] <= 50)) {
D_display_800CA234 = this;
D_display_Timer_800CA238 = 320;
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
gTeamHelpActor = this;
gTeamHelpTimer = 320;
}
break;
case AI360_SLIPPY:
@@ -1134,9 +1134,9 @@ void ActorAllRange_ApplyDamage(Actor* this) {
} else {
Radio_PlayMessage(gMsg_ID_9152, RCID_SLIPPY);
}
if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiType] <= 50)) {
D_display_800CA234 = this;
D_display_Timer_800CA238 = 320;
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
gTeamHelpActor = this;
gTeamHelpTimer = 320;
}
break;
case AI360_PEPPY:
@@ -1145,9 +1145,9 @@ void ActorAllRange_ApplyDamage(Actor* this) {
} else {
Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY);
}
if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiType] <= 50)) {
D_display_800CA234 = this;
D_display_Timer_800CA238 = 320;
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) {
gTeamHelpActor = this;
gTeamHelpTimer = 320;
}
break;
}
@@ -1471,7 +1471,7 @@ void ActorAllRange_Update(Actor* this) {
}
if (this->aiIndex == AI360_FOX) {
if (gCurrentLevel != LEVEL_VENOM_2) {
if (((gPlayer[0].unk_4DC != 0) && (this->iwork[4] > 10)) ||
if ((gPlayer[0].somersault && (this->iwork[4] > 10)) ||
((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY))) {
this->state = 3;
this->unk_04E = 300;
@@ -1491,7 +1491,7 @@ void ActorAllRange_Update(Actor* this) {
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f;
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
}
if (gPlayer[0].unk_4DC == 0) {
if (!gPlayer[0].somersault) {
this->fwork[4] = gPlayer[0].pos.x + spCC;
this->fwork[5] = gPlayer[0].pos.y + spC8;
this->fwork[6] = gPlayer[0].unk_138 + spC4;
@@ -1608,9 +1608,9 @@ void ActorAllRange_Update(Actor* this) {
ActorAllRange_PlayMessage(gMsg_ID_9100, RCID_FALCO);
}
gActors[this->aiIndex].iwork[2] = this->aiType;
if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiIndex] <= 50)) {
D_display_800CA234 = &gActors[this->aiIndex];
D_display_Timer_800CA238 = 320;
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiIndex] <= 50)) {
gTeamHelpActor = &gActors[this->aiIndex];
gTeamHelpTimer = 320;
}
break;
case AI360_SLIPPY:
@@ -1622,9 +1622,9 @@ void ActorAllRange_Update(Actor* this) {
ActorAllRange_PlayMessage(gMsg_ID_9110, RCID_SLIPPY);
}
gActors[this->aiIndex].iwork[2] = this->aiType;
if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiIndex] <= 50)) {
D_display_800CA234 = &gActors[this->aiIndex];
D_display_Timer_800CA238 = 320;
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiIndex] <= 50)) {
gTeamHelpActor = &gActors[this->aiIndex];
gTeamHelpTimer = 320;
}
break;
case AI360_PEPPY:
@@ -1636,9 +1636,9 @@ void ActorAllRange_Update(Actor* this) {
ActorAllRange_PlayMessage(gMsg_ID_9120, RCID_PEPPY);
}
gActors[this->aiIndex].iwork[2] = this->aiType;
if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiIndex] <= 50)) {
D_display_800CA234 = &gActors[this->aiIndex];
D_display_Timer_800CA238 = 320;
if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiIndex] <= 50)) {
gTeamHelpActor = &gActors[this->aiIndex];
gTeamHelpTimer = 320;
}
break;
case AI360_WOLF:
@@ -2124,14 +2124,14 @@ void ActorAllRange_Update(Actor* this) {
}
}
void func_360_80034E64(Actor* actor) {
void ActorAllRange_DrawShield(Actor* this) {
f32 sp24;
s32 sp20;
if (actor->fwork[22] > 0) {
if (this->fwork[22] > 0) {
Matrix_Push(&gGfxMatrix);
sp24 = 3.5f;
sp20 = (s32) (actor->fwork[22] * 60.0f);
sp20 = (s32) (this->fwork[22] * 60.0f);
if (gCurrentLevel == LEVEL_VENOM_2) {
sp24 *= 1.5f;
}
@@ -2152,26 +2152,26 @@ void func_360_80034E64(Actor* actor) {
}
}
void func_360_80035098(Actor* actor) {
s32 sp2C;
void ActorAllRange_DrawBarrelRoll(Actor* this) {
s32 alpha;
if (actor->fwork[23] > 1.0f) {
if (this->fwork[23] > 1.0f) {
Matrix_Push(&gGfxMatrix);
sp2C = actor->fwork[23];
alpha = this->fwork[23];
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, M_DTOR * -actor->obj.rot.y - gPlayer[0].camYaw, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, M_DTOR * -this->obj.rot.y - gPlayer[0].camYaw, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, gPlayer[0].camPitch, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * actor->iwork[15] * M_DTOR, MTXF_APPLY);
if (actor->iwork[15] < 0) {
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * this->iwork[15] * M_DTOR, MTXF_APPLY);
if (this->iwork[15] < 0) {
Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY);
}
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL(&gMasterDisp, 0x43);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, sp2C);
gDPSetEnvColor(gMasterDisp++, 0, 0, 160, sp2C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha);
gDPSetEnvColor(gMasterDisp++, 0, 0, 160, alpha);
gSPDisplayList(gMasterDisp++, D_101DC10);
Matrix_Pop(&gGfxMatrix);
}
@@ -2224,7 +2224,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
Matrix_Push(&gGfxMatrix);
func_edisplay_8005B388(this);
Matrix_Pop(&gGfxMatrix);
func_360_80035098(this);
ActorAllRange_DrawBarrelRoll(this);
break;
case AI360_WOLF:
case AI360_LEON:
@@ -2234,36 +2234,36 @@ void ActorAllRange_Draw(ActorAllRange* this) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
Matrix_Pop(&gGfxMatrix);
func_360_80035098(this);
func_360_80034E64(this);
ActorAllRange_DrawBarrelRoll(this);
ActorAllRange_DrawShield(this);
} else {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
if (gCurrentLevel == LEVEL_BOLSE) {
func_edisplay_8005B1E8(this, 3);
Actor_DrawEngineGlow(this, 3);
} else {
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
}
}
break;
case AI360_KATT:
gSPDisplayList(gMasterDisp++, D_D009A40);
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case AI360_BILL:
gSPDisplayList(gMasterDisp++, D_D00B880);
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case AI360_GREAT_FOX:
func_edisplay_8005F670(&this->obj.pos);
this->unk_0B6 = 1;
func_demo_8004FEC0(this);
Actor195_Draw(this);
break;
case AI360_MISSILE:
Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C);
@@ -2271,7 +2271,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
gCalcMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], MTXF_APPLY);
func_edisplay_8005B1E8(this, 3);
Actor_DrawEngineGlow(this, 3);
break;
default:
if (gCurrentLevel == LEVEL_FORTUNA) {
@@ -2280,7 +2280,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
gSPDisplayList(gMasterDisp++, D_FO_6006BE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -100.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
} else if (gCurrentLevel == LEVEL_KATINA) {
switch (this->unk_0B6) {
case 0:
@@ -2289,24 +2289,25 @@ void ActorAllRange_Draw(ActorAllRange* this) {
case 1:
gSPDisplayList(gMasterDisp++, D_KA_600E050);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 0);
Actor_DrawEngineGlow(this, 0);
break;
case 3:
gSPDisplayList(gMasterDisp++, D_KA_6001530);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
func_360_80034E64(this);
ActorAllRange_DrawShield(this);
break;
}
} else if (gCurrentLevel == LEVEL_SECTOR_Z) {
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
} else if (gCurrentLevel == LEVEL_BOLSE) {
gSPDisplayList(gMasterDisp++, D_BO_6008770) Matrix_Push(&gGfxMatrix);
gSPDisplayList(gMasterDisp++, D_BO_6008770);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
Matrix_Pop(&gGfxMatrix);
func_360_80034E64(this);
ActorAllRange_DrawShield(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
Animation_GetFrameData(&D_VE2_600C200, this->unk_04A, this->vwork);
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
@@ -2317,11 +2318,11 @@ void ActorAllRange_Draw(ActorAllRange* this) {
if (this->aiIndex == AI360_FOX) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 3);
Actor_DrawEngineGlow(this, 3);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
}
}
break;
+2 -2
View File
@@ -393,7 +393,7 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) {
}
if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->unk_0F4.z != 0.0f) ||
(actor->vwork[29].y != 0.0f)) &&
(actor->unk_0B4 != 31)) {
(actor->unk_0B4 != EINFO_31)) {
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, MTXF_APPLY);
@@ -1712,7 +1712,7 @@ bool func_beam_8003BB4C(PlayerShot* shot) {
}
if (gVersusMode) {
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_4DC == 0) &&
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !player->somersault &&
(player->form != FORM_ON_FOOT) && (i != shot->playerNum) && (D_ctx_80177B00[i][shot->playerNum] == 0) &&
(fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) &&
(fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) &&
+14 -14
View File
@@ -187,17 +187,17 @@ void func_bg_8003DE68(s32 arg0, s32 arg1) {
gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE);
gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
if (D_ctx_80178420 >= 480.0f) {
D_ctx_80178420 -= 480.0f;
if (D_ctx_80178420 >= 1.5f * SCREEN_WIDTH) {
D_ctx_80178420 -= 1.5f * SCREEN_WIDTH;
}
if (D_ctx_80178424 >= 360.0f) {
D_ctx_80178424 -= 360.0f;
if (D_ctx_80178424 >= 1.5f * SCREEN_HEIGHT) {
D_ctx_80178424 -= 1.5f * SCREEN_HEIGHT;
}
if (D_ctx_80178420 < 0.0f) {
D_ctx_80178420 += 480.0f;
D_ctx_80178420 += 1.5f * SCREEN_WIDTH;
}
if (D_ctx_80178424 < 0.0f) {
D_ctx_80178424 += 360.0f;
D_ctx_80178424 += 1.5f * SCREEN_HEIGHT;
}
spf68 = D_ctx_80178420;
@@ -213,17 +213,17 @@ void func_bg_8003DE68(s32 arg0, s32 arg1) {
for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) {
var_fv1 = *sp60 + spf68;
var_fa0 = *sp5C + spf64;
if (var_fv1 >= 400.0f) {
var_fv1 -= 480.0f;
if (var_fv1 >= SCREEN_WIDTH * 1.25f) {
var_fv1 -= 1.5f * SCREEN_WIDTH;
}
var_fv1 -= 160.0f;
if (var_fa0 >= 300.0f) {
var_fa0 -= 360.0f;
var_fv1 -= SCREEN_WIDTH / 2.0f;
if (var_fa0 >= SCREEN_HEIGHT * 1.25f) {
var_fa0 -= 1.5f * SCREEN_HEIGHT;
}
var_fa0 -= 120.0f;
var_fa0 -= SCREEN_HEIGHT / 2.0f;
temp_ft2 = (sp70 * var_fv1) + (spf6C * var_fa0) + 160.0f;
temp_ft0 = (-spf6C * var_fv1) + (sp70 * var_fa0) + 120.0f;
temp_ft2 = (sp70 * var_fv1) + (spf6C * var_fa0) + SCREEN_WIDTH / 2.0f;
temp_ft0 = (-spf6C * var_fv1) + (sp70 * var_fa0) + SCREEN_HEIGHT / 2.0f;
if ((temp_ft2 >= 0) && (temp_ft2 < SCREEN_WIDTH) && (arg0 < temp_ft0) && (temp_ft0 < arg1)) {
gDPPipeSync(gMasterDisp++);
gDPSetFillColor(gMasterDisp++, *sp58);
+7 -7
View File
@@ -256,13 +256,13 @@ PlayerShot gPlayerShots[16];
TexturedLine gTexturedLines[100];
RadarMark gRadarMarks[65];
BonusText gBonusText[10];
s32 D_ctx_80176550[2];
f32 D_ctx_80176558[2][100];
f32 D_ctx_80176878[2][100];
f32 D_ctx_80176B98[2][100];
f32 D_ctx_80176EB8[2][100];
f32 D_ctx_801771D8[2][100];
f32 D_ctx_80177500[2][100];
s32 gActor194Status[2];
f32 gActor194xPos[2][100];
f32 gActor194yPos[2][100];
f32 gActor194zPos[2][100];
f32 gActor194xRot[2][100];
f32 gActor194yRot[2][100];
f32 gActor194zRot[2][100];
UNK_TYPE P_800D31A8 = 0;
u16 gEnemyShotSpeed; // enemy shot speed?
u8 D_ctx_80177830; // show level complete status overlay
+46 -46
View File
@@ -174,12 +174,12 @@ void func_demo_80048CC4(Actor* actor, s32 arg1) {
Object_SetInfo(&actor->info, actor->obj.id);
if (arg1 == 3) {
AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x31024059U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0);
actor->unk_0B6 = 1;
} else {
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4);
AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4);
}
}
@@ -204,7 +204,7 @@ void Cutscene_WarpZoneComplete(Player* player) {
switch (player->unk_1D0) {
case 0:
player->unk_4DC = 0;
player->somersault = false;
Audio_StopSfxByBankAndSource(1, player->sfxSource);
player->unk_1D0++;
D_ctx_80177A48[0] = 0.0f;
@@ -266,7 +266,7 @@ void Cutscene_WarpZoneComplete(Player* player) {
break;
case 450:
AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0);
player->unk_194 = 5.0f;
player->unk_190 = 5.0f;
@@ -357,7 +357,7 @@ void func_demo_80049630(Actor* actor) {
case 1:
actor->state = 2;
AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0);
actor->timer_0BC = 150;
actor->fwork[29] = 5.0f;
@@ -411,7 +411,7 @@ void func_demo_80049968(Actor* actor, s32 arg1) {
actor->vel.z = gPlayer[0].vel.z;
Object_SetInfo(&actor->info, actor->obj.id);
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U);
AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4);
}
void func_demo_80049A9C(Effect* effect, f32 x, f32 y, f32 z) {
@@ -451,7 +451,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->pos.x += player->vel.x;
player->flags_228 = 0;
player->cockpitView = 0;
player->cockpitView = false;
player->pos.y += player->vel.y;
player->pos.z += player->vel.z;
@@ -476,7 +476,7 @@ void Cutscene_EnterWarpZone(Player* player) {
switch (player->unk_1D0) {
case 0:
player->unk_4DC = 0;
player->somersault = false;
D_ctx_80178414 = 100.0f;
player->unk_1D0 = 1;
D_ctx_80178410 = 1;
@@ -521,7 +521,7 @@ void Cutscene_EnterWarpZone(Player* player) {
if (player->timer_1F8 <= 100) {
if (player->timer_1F8 == 100) {
func_play_800A6028(player->sfxSource, 0x0940802AU);
func_play_800A6028(player->sfxSource, 0x0940802A);
player->unk_194 = 5.0f;
player->unk_190 = 5.0f;
}
@@ -540,22 +540,22 @@ void Cutscene_EnterWarpZone(Player* player) {
if ((player->timer_1F8 == 95) && (gTeamShields[TEAM_ID_FALCO] > 0)) {
gActors[0].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[0].sfxSource, 0);
AUDIO_PLAY_SFX(0x0940802A, gActors[0].sfxSource, 0);
}
if ((player->timer_1F8 == 90) && (gTeamShields[TEAM_ID_PEPPY] > 0)) {
gActors[2].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[2].sfxSource, 0);
AUDIO_PLAY_SFX(0x0940802A, gActors[2].sfxSource, 0);
}
if ((player->timer_1F8 == 85) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) {
gActors[1].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[1].sfxSource, 0);
AUDIO_PLAY_SFX(0x0940802A, gActors[1].sfxSource, 0);
}
if (player->timer_1F8 == 60) {
gActors[3].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[3].sfxSource, 0);
AUDIO_PLAY_SFX(0x0940802A, gActors[3].sfxSource, 0);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
}
@@ -574,7 +574,7 @@ void Cutscene_EnterWarpZone(Player* player) {
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
func_play_800A6148();
Play_ClearObjectData();
player->unk_1D0 = 5;
player->timer_1F8 = 10;
player->unk_08C = -10000.0f;
@@ -588,7 +588,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->unk_234 = 1;
gLevelStage = 1;
D_display_800CA230 = 0.15f;
AUDIO_PLAY_SFX(0x11407079U, gDefaultSfxSource, 0);
AUDIO_PLAY_SFX(0x11407079, gDefaultSfxSource, 0);
func_play_800AB334();
}
}
@@ -737,7 +737,7 @@ void func_demo_8004A700(Actor* actor, s32 arg1) {
actor->obj.rot.z = D_demo_800CA074[arg1];
actor->iwork[11] = 1;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U);
AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4);
}
void func_demo_8004A840(s32 actor) {
@@ -865,11 +865,11 @@ void Cutscene_AllRangeMode(Player* player) {
}
if (gCsFrameCount == 138) {
AUDIO_PLAY_SFX(0x09000007U, player->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000007, player->sfxSource, 0);
}
if (gCsFrameCount == 190) {
AUDIO_PLAY_SFX(0x09000013U, player->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0);
}
if (D_ctx_80177A48[1] > 350.0f) {
@@ -879,7 +879,7 @@ void Cutscene_AllRangeMode(Player* player) {
player->unk_194 = 10.0f;
player->unk_190 = 10.0f;
AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0);
D_ctx_801779A8[player->num] = 70.0f;
@@ -1165,7 +1165,7 @@ void Cutscene_CoComplete2(Player* player) {
}
if (player->timer_1F8 == 90) {
func_play_800A6148();
Play_ClearObjectData();
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
func_demo_8004A840(2);
}
@@ -1307,7 +1307,7 @@ void Cutscene_CoComplete2(Player* player) {
case 1255:
player->unk_1D0 = 3;
player->timer_1F8 = 10;
func_play_800A6028(player->sfxSource, 0x09000002U);
func_play_800A6028(player->sfxSource, 0x09000002);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
break;
@@ -1514,7 +1514,7 @@ void Cutscene_UTurn(Player* player) {
player->unk_12C = -180.0f;
}
player->unk_1D0 = 3;
func_play_800A5FA0(player->sfxSource, 0x09000002U, player->num);
func_play_800A5FA0(player->sfxSource, 0x09000002, player->num);
player->unk_194 = 7.0f;
player->unk_190 = 7.0f;
}
@@ -1611,8 +1611,8 @@ void Cutscene_KillPlayer(Player* player) {
s32 teamId;
func_8001CA24(player->num);
Audio_KillSfxBySourceAndId(player->sfxSource, 0x0900C010U);
func_play_800A5FA0(player->sfxSource, 0x0903F004U, player->num);
Audio_KillSfxBySourceAndId(player->sfxSource, 0x0900C010);
func_play_800A5FA0(player->sfxSource, 0x0903F004, player->num);
player->state_1C8 = PLAYERSTATE_1C8_NEXT;
player->timer_1F8 = 70;
player->timer_224 = 20;
@@ -1728,7 +1728,7 @@ void func_demo_8004D828(Player* player) {
player->vel.y = 10.0f;
player->unk_1D0 = 1;
func_play_800A6070(player->sfxSource, 0x29000000U);
func_play_800A6070(player->sfxSource, 0x29000000);
if ((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_FORTUNA)) {
func_enmy_80062C38(player->pos.x, player->pos.z);
@@ -1838,7 +1838,7 @@ void func_demo_8004DEF8(Player* player) {
player->timer_220 = 0;
player->vel.y = 10.0f;
player->unk_1D0 = 1;
func_play_800A6070(player->sfxSource, 0x29000000U);
func_play_800A6070(player->sfxSource, 0x29000000);
if (gCurrentLevel == LEVEL_CORNERIA) {
func_enmy_80062C38(player->pos.x, player->pos.z);
}
@@ -1949,7 +1949,7 @@ void func_demo_8004E4D4(Actor* actor) {
actor->state = 2;
actor->timer_0BC = 50;
actor->fwork[9] = 2.0f;
AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0);
actor->fwork[29] = 5.0f;
/* fallthrough */
@@ -1971,7 +1971,7 @@ void func_demo_8004E4D4(Actor* actor) {
actor->state = 11;
actor->timer_0BC = 150;
actor->timer_0BE = 40;
AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0);
actor->fwork[29] = 5.0f;
/* fallthrough */
case 11:
@@ -2026,7 +2026,7 @@ void func_demo_8004E4D4(Actor* actor) {
break;
case 31:
AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0);
actor->state += 1;
actor->fwork[29] = 5.0f;
/* fallthrough */
@@ -2183,7 +2183,7 @@ void func_demo_8004F05C(Actor* actor) {
case 1:
actor->state = 2;
actor->timer_0BC = 100;
AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0U);
AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0);
actor->fwork[29] = 5.0f;
case 2:
@@ -2340,7 +2340,7 @@ void func_demo_8004F798(Actor* actor) {
}
}
void func_demo_8004F8AC(Actor* actor) {
void Actor195_Update(Actor* actor) {
if (gCurrentLevel == LEVEL_AQUAS) {
func_hud_80093164(actor);
@@ -2402,7 +2402,7 @@ void func_demo_8004F8AC(Actor* actor) {
actor->state = 1;
actor->timer_0BC = 50;
actor->iwork[0] = 255;
AUDIO_PLAY_SFX(0x2902F026U, actor->sfxSource, 0);
AUDIO_PLAY_SFX(0x2902F026, actor->sfxSource, 0);
}
break;
@@ -2517,7 +2517,7 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) {
}
}
void func_demo_8004FEC0(Actor* actor) {
void Actor195_Draw(Actor* actor) {
static f32 D_800CA210 = 0.0f;
static f32 D_800CA214 = 0.0f;
static f32 D_800CA218 = 0.0f;
@@ -2544,7 +2544,7 @@ void func_demo_8004FEC0(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
if (actor->unk_046 > 50) {
func_edisplay_8005ADAC(actor);
Actor_DrawEngineAndContrails(actor);
}
break;
@@ -2557,7 +2557,7 @@ void func_demo_8004FEC0(Actor* actor) {
gSPFogPosition(gMasterDisp++, gFogNear, 1005);
}
actor->info.bonus = 1;
func_demo_800515C4();
Cutscene_DrawGreatFox();
break;
case 10:
@@ -2587,7 +2587,7 @@ void func_demo_8004FEC0(Actor* actor) {
case 24:
gSPDisplayList(gMasterDisp++, D_D009A40);
func_edisplay_8005ADAC(actor);
Actor_DrawEngineAndContrails(actor);
break;
case 25:
@@ -2601,13 +2601,13 @@ void func_demo_8004FEC0(Actor* actor) {
case 26:
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(actor, 2);
Actor_DrawEngineGlow(actor, 2);
break;
case 28:
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0);
Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(actor, 2);
Actor_DrawEngineGlow(actor, 2);
break;
case 30:
@@ -2615,7 +2615,7 @@ void func_demo_8004FEC0(Actor* actor) {
if (actor->unk_046 != 0) {
RCP_SetupDL(&gMasterDisp, 0x37);
gSPClearGeometryMode(gMasterDisp++, 0x00002000);
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
Rand_SetSeed(1, 29000, 9876);
for (sp2D0 = 0; sp2D0 < 30; sp2D0++) {
@@ -2717,9 +2717,9 @@ void func_demo_8004FEC0(Actor* actor) {
Matrix_SetGfxMtx(&gMasterDisp);
gDPSetTextureFilter(gMasterDisp++, 0 << 12);
gDPSetTextureFilter(gMasterDisp++, G_TF_POINT);
gSPDisplayList(gMasterDisp++, D_BO_6000D80);
gDPSetTextureFilter(gMasterDisp++, 2 << 12);
gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gGfxMatrix);
@@ -2748,7 +2748,7 @@ void func_demo_8004FEC0(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_KA_600E050);
}
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
func_edisplay_8005B1E8(actor, 0);
Actor_DrawEngineGlow(actor, 0);
break;
case 34:
@@ -2879,9 +2879,9 @@ void func_demo_8004FEC0(Actor* actor) {
case 44:
Animation_GetFrameData(&D_AQ_6020A40, actor->iwork[0], actor->vwork);
gSPClearGeometryMode(gMasterDisp++, 0x00002000);
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
Animation_DrawSkeleton(1, D_AQ_6020C6C, actor->vwork, 0, 0, &actor->index, &gIdentityMatrix);
gSPSetGeometryMode(gMasterDisp++, 0x00002000);
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
break;
case 45:
@@ -2900,7 +2900,7 @@ void func_demo_8004FEC0(Actor* actor) {
}
}
void func_demo_800515C4(void) {
void Cutscene_DrawGreatFox(void) {
Vec3f* var_s6_2;
s32 i;
s32 j;
+24 -24
View File
@@ -21,8 +21,8 @@ u8 sPlayersVisible[] = { 0, 0, 0, 0 }; //
s32 sDrawCockpit = 0; //
s32 D_display_800CA22C = 0; //
f32 D_display_800CA230 = 0.0f;
Actor* D_display_800CA234 = NULL;
s32 D_display_Timer_800CA238 = 0;
Actor* gTeamHelpActor = NULL;
s32 gTeamHelpTimer = 0;
f32 D_display_800CA23C[3] = { 0.5f, 0.25f, 0.25f }; //
f32 D_display_800CA248[3] = { 2.0f, 1.0f, 0.5f }; //
@@ -33,34 +33,34 @@ void func_display_80051B30(void) {
Vec3f sp68;
Vec3f sp5C;
if ((gPlayState == PLAY_PAUSE) || (D_display_800CA234 == NULL)) {
if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) {
return;
}
if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
D_display_800CA234 = NULL;
D_display_Timer_800CA238 = 0;
if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
return;
}
if (D_display_Timer_800CA238 != 0) {
D_display_Timer_800CA238--;
if (D_display_Timer_800CA238 == 0) {
D_display_800CA234 = NULL;
if (gTeamHelpTimer != 0) {
gTeamHelpTimer--;
if (gTeamHelpTimer == 0) {
gTeamHelpActor = NULL;
return;
}
}
if (!(D_display_Timer_800CA238 & 4)) {
if (!(gTeamHelpTimer & 4)) {
Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY);
sp68.x = D_display_800CA234->obj.pos.x - gPlayer[0].cam.eye.x;
sp68.y = D_display_800CA234->obj.pos.y - gPlayer[0].cam.eye.y;
sp68.z = D_display_800CA234->obj.pos.z + D_ctx_80177D20 - gPlayer[0].cam.eye.z;
sp68.x = gTeamHelpActor->obj.pos.x - gPlayer[0].cam.eye.x;
sp68.y = gTeamHelpActor->obj.pos.y - gPlayer[0].cam.eye.y;
sp68.z = gTeamHelpActor->obj.pos.z + D_ctx_80177D20 - gPlayer[0].cam.eye.z;
Matrix_MultVec3f(gCalcMatrix, &sp68, &sp5C);
sp7C = 0;
if ((sp5C.z < 0.0f) && (sp5C.z > -12000.0f) && (fabsf(sp5C.x) < fabsf(sp5C.z * 0.4f))) {
sp7C = 1;
}
RCP_SetupDL(&gMasterDisp, 0xC);
switch (D_display_800CA234->aiType) {
switch (gTeamHelpActor->aiType) {
case AI360_PEPPY:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 30, 0, 255);
break;
@@ -73,7 +73,7 @@ void func_display_80051B30(void) {
}
switch (sp7C) {
case 0:
if (D_display_800CA234->sfxSource[0] > 0.0f) {
if (gTeamHelpActor->sfxSource[0] > 0.0f) {
sp78 = 20.0f;
sp74 = M_PI / 2;
} else {
@@ -616,7 +616,7 @@ void func_display_80053C38(Player* player, s32 arg1) {
sp4C.z = 2400.0f + sp48;
Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]);
}
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS) &&
(fabsf(player->unk_138 + D_ctx_80177D20 - player->cam.eye.z) < 10.0f)) {
if (arg1 == 0) {
sDrawCockpit = 1;
@@ -757,7 +757,7 @@ void func_display_80054300(Player* player) {
}
}
void func_display_8005465C(s32 levelType) {
void Play_DrawEngineGlow(s32 levelType) {
RCP_SetupDL(&gMasterDisp, 0x43);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
@@ -798,7 +798,7 @@ void func_display_8005478C(Player* player) {
Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, MTXF_APPLY);
}
Matrix_SetGfxMtx(&gMasterDisp);
func_display_8005465C(gLevelType);
Play_DrawEngineGlow(gLevelType);
Matrix_Pop(&gGfxMatrix);
}
@@ -874,7 +874,7 @@ void func_display_80054E80(Player* player) {
if (gChargeTimers[player->num] > 10) {
RCP_SetupDL(&gMasterDisp, 0x43);
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
@@ -884,7 +884,7 @@ void func_display_80054E80(Player* player) {
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, MTXF_APPLY);
Matrix_Push(&gGfxMatrix);
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY);
} else {
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
@@ -916,7 +916,7 @@ void func_display_80054E80(Player* player) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_101C2E0);
Matrix_Pop(&gGfxMatrix);
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY);
}
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY);
@@ -941,7 +941,7 @@ void func_display_80054E80(Player* player) {
case LASERS_SINGLE:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128);
gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128);
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
@@ -1565,7 +1565,7 @@ void Play_Draw(void) {
gPlayerCamAt.y += player->pos.y;
gPlayerCamAt.z += player->unk_138 + player->unk_144;
if ((player->cockpitView != 0) && (player->unk_110 > 5.0f)) {
if (player->cockpitView && (player->unk_110 > 5.0f)) {
gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f;
}
} else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
+1 -1
View File
@@ -288,7 +288,7 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_ACTOR_192 */ {(void*) func_edisplay_8005B9A4, 1, (ObjectFunc) func_enmy_8006654C, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 },
/* OBJ_ACTOR_193 */ {(void*) func_edisplay_8005BA30, 1, (ObjectFunc) func_enmy_800669A0, D_CO_603E598, 100.0f, 0, 1, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_194 */ {(void*) Actor194_Draw, 1, (ObjectFunc) Actor194_Update, gActor194HItbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_195 */ {(void*) func_demo_8004FEC0, 1, (ObjectFunc) func_demo_8004F8AC, gHitboxNone, 20000.0f, 0, 1, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_195 */ {(void*) Actor195_Draw, 1, (ObjectFunc) Actor195_Update, gHitboxNone, 20000.0f, 0, 1, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_196 */ {(void*) Actor196_Draw, 1, (ObjectFunc) Actor196_Update, D_CO_603E5B4, 200.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ALLRANGE */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorAllRange_Update, gActorAllRangeHItbox, 20000.0f, 0, 1, 39, 1, 1.0f, 1 },
/* OBJ_ACTOR_TEAM_BOSS */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorTeamBoss_Update, gTeamHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 },
+18 -18
View File
@@ -422,7 +422,7 @@ void Actor189_Draw(Actor189* this) {
}
}
void func_edisplay_8005ADAC(Actor* actor) {
void Actor_DrawEngineAndContrails(Actor* actor) {
f32 sp5C;
f32 temp1;
f32 sp54;
@@ -447,7 +447,7 @@ void func_edisplay_8005ADAC(Actor* actor) {
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
func_display_8005465C(gLevelType);
Play_DrawEngineGlow(gLevelType);
Matrix_Pop(&gGfxMatrix);
}
sp5C = actor->fwork[21];
@@ -483,7 +483,7 @@ f32 D_edisplay_800CFCA0[] = {
1.7f, 1.8f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 3.0f,
};
void func_edisplay_8005B1E8(Actor* actor, s32 levelType) {
void Actor_DrawEngineGlow(Actor* actor, s32 levelType) {
f32 scale;
if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) {
@@ -501,7 +501,7 @@ void func_edisplay_8005B1E8(Actor* actor, s32 levelType) {
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
func_display_8005465C(levelType);
Play_DrawEngineGlow(levelType);
Matrix_Pop(&gGfxMatrix);
}
}
@@ -552,7 +552,7 @@ void func_edisplay_8005B388(Actor* actor) {
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870);
}
func_edisplay_8005ADAC(actor);
Actor_DrawEngineAndContrails(actor);
}
void func_edisplay_8005B6A4(Actor* actor) {
@@ -595,7 +595,7 @@ void func_edisplay_8005B848(Actor* actor) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
actor->iwork[11] = 1;
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
func_edisplay_8005B1E8(actor, 2);
Actor_DrawEngineGlow(actor, 2);
}
void func_edisplay_8005B9A4(Actor* actor) {
@@ -1282,7 +1282,7 @@ void Item_Draw(Item* this, s32 arg1) {
}
}
void func_edisplay_8005EA24(Actor* actor) {
void ActorAllRange_DrawShadow(Actor* actor) {
Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, MTXF_APPLY);
if (gCurrentLevel == LEVEL_FORTUNA) {
Matrix_RotateY(gGfxMatrix, actor->fwork[27], MTXF_APPLY);
@@ -1313,11 +1313,11 @@ void func_edisplay_8005EA24(Actor* actor) {
}
}
void func_edisplay_8005ECD8(s32 index, Object* obj) {
void Object_DrawShadow(s32 index, Object* obj) {
RCP_SetupDL(&gMasterDisp, 0x42);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 180);
if (obj->id == OBJ_ACTOR_ALLRANGE) {
func_edisplay_8005EA24(&gActors[index]);
ActorAllRange_DrawShadow(&gActors[index]);
} else {
switch (obj->id) {
case OBJ_ACTOR_230:
@@ -1468,7 +1468,7 @@ void Object_58_Draw(Object_58* this) {
}
}
void func_edisplay_8005F670(Vec3f* arg0) {
void func_edisplay_8005F670(Vec3f* pos) {
Vec3f sp9C;
f32 sp98;
f32 sp94;
@@ -1482,10 +1482,10 @@ void func_edisplay_8005F670(Vec3f* arg0) {
f32 pad;
if (D_ctx_8017836C > 0.01f) {
sp9C.x = arg0->x - D_ctx_80178370;
sp9C.y = arg0->y - D_ctx_80178374;
sp9C.z = arg0->z - D_ctx_80178378;
temp_fv0 = (VEC3F_MAG(&sp9C));
sp9C.x = pos->x - D_ctx_80178370;
sp9C.y = pos->y - D_ctx_80178374;
sp9C.z = pos->z - D_ctx_80178378;
temp_fv0 = VEC3F_MAG(&sp9C);
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
var_fs0 = 700.0f / temp_fv0;
} else {
@@ -1595,7 +1595,7 @@ void Object_DrawAll(s32 arg0) {
Matrix_Pop(&gGfxMatrix);
if ((boss->unk_05E != 0) && (D_edisplay_801615D0.y > 0.0f)) {
Matrix_Push(&gGfxMatrix);
func_edisplay_8005ECD8(i, &boss->obj);
Object_DrawShadow(i, &boss->obj);
Matrix_Pop(&gGfxMatrix);
}
}
@@ -1643,7 +1643,7 @@ void Object_DrawAll(s32 arg0) {
Matrix_Pop(&gGfxMatrix);
if (actor->unk_0C9 != 0) {
Matrix_Push(&gGfxMatrix);
func_edisplay_8005ECD8(i, &actor->obj);
Object_DrawShadow(i, &actor->obj);
Matrix_Pop(&gGfxMatrix);
}
break;
@@ -1654,7 +1654,7 @@ void Object_DrawAll(s32 arg0) {
if ((actor->unk_0C9 != 0) && (D_edisplay_801615EC != 0) &&
((D_edisplay_801615E0.z > -4000.0f) || (gCurrentLevel != LEVEL_KATINA))) {
Matrix_Push(&gGfxMatrix);
func_edisplay_8005ECD8(i, &actor->obj);
Object_DrawShadow(i, &actor->obj);
Matrix_Pop(&gGfxMatrix);
}
break;
@@ -1700,7 +1700,7 @@ void Effect_DrawAll(s32 arg0) {
func_edisplay_8005F1EC(effect->sfxSource);
if (effect->obj.id == OBJ_EFFECT_374) {
Matrix_Push(&gGfxMatrix);
func_edisplay_8005ECD8(i, &effect->obj);
Object_DrawShadow(i, &effect->obj);
Matrix_Pop(&gGfxMatrix);
}
}
+3 -3
View File
@@ -701,9 +701,9 @@ void func_effect_8007968C(Effect* effect) {
}
}
bool func_effect_800798C4(s32 arg0, Gfx** arg1, Vec3f* arg2, Vec3f* arg3, void* arg4) {
if ((arg0 != 1) && (arg0 != 5)) {
*arg1 = NULL;
bool func_effect_800798C4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) {
if ((limbIndex != 1) && (limbIndex != 5)) {
*dList = NULL;
}
return false;
}
+10 -10
View File
@@ -369,7 +369,7 @@ void func_enmy_80061E48(Actor* actor, f32 xPos, f32 yPos, f32 zPos) {
Object_SetInfo(&actor->info, actor->obj.id);
}
void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 index) {
void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) {
Vec3f sp24;
Actor_Initialize(actor);
@@ -495,7 +495,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) {
if (objInit->id > OBJ_UNK_406) {
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].obj.status == OBJ_FREE) {
func_enmy_80061F0C(&gActors[i], objInit, i);
ActorEvent_Load(&gActors[i], objInit, i);
break;
}
}
@@ -1158,12 +1158,12 @@ void Object_Init(s32 index, ObjectId objId) {
case OBJ_ACTOR_194:
gActors[index].unk_046 = 100;
for (var_a0 = 0; var_a0 < 2; var_a0++) {
if (D_ctx_80176550[var_a0] == 0) {
D_ctx_80176550[var_a0] = 1;
if (gActor194Status[var_a0] == 0) {
gActor194Status[var_a0] = 1;
gActors[index].unk_046 = var_a0;
for (var_a2 = 0; var_a2 < 100; var_a2++) {
D_ctx_80176878[var_a0][var_a2] = gActors[index].obj.pos.y;
D_ctx_80176B98[var_a0][var_a2] = gActors[index].obj.pos.z;
gActor194yPos[var_a0][var_a2] = gActors[index].obj.pos.y;
gActor194zPos[var_a0][var_a2] = gActors[index].obj.pos.z;
}
break;
}
@@ -2200,7 +2200,7 @@ void ItemSupplyRing_Update(Item* this) {
} else {
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f;
}
if ((gPlayer[0].cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (gPlayer[0].cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 300.0f - this->obj.pos.z) * 0.3f;
} else {
this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f;
@@ -2300,7 +2300,7 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) {
} else {
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.3f;
}
if (gPlayer[0].cockpitView != 0) {
if (gPlayer[0].cockpitView) {
this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 200.0f - this->obj.pos.z) * 0.3f;
} else {
this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 100.0f - this->obj.pos.z) * 0.3f;
@@ -2512,11 +2512,11 @@ void Actor_Move(Actor* actor) {
Titania_8018E3B0(actor);
break;
case OBJ_ACTOR_194:
D_ctx_80176550[actor->unk_046] = 0;
gActor194Status[actor->unk_046] = 0;
break;
case OBJ_ACTOR_EVENT:
if ((actor->unk_0B4 >= EINFO_200) && (actor->unk_0B4 < EINFO_300)) {
D_ctx_80176550[actor->unk_046] = 0;
gActor194Status[actor->unk_046] = 0;
} else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) {
gRingPassCount = -1;
}
+143 -143
View File
@@ -32,7 +32,7 @@ void ActorEvent_SetMessage(u16* msg, s32 character) {
}
}
void func_enmy2_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
void func_enmy2_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
Effect_Initialize(effect);
effect->obj.status = OBJ_INIT;
@@ -47,10 +47,10 @@ void func_enmy2_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4)
}
effect->unk_4A = 100;
effect->scale2 = arg4 * 0.25f;
effect->scale2 = scale2 * 0.25f;
effect->scale1 = 0.3f;
if (arg4 < 10.0f) {
if (scale2 < 10.0f) {
effect->scale1 = 0.1f;
}
@@ -58,12 +58,12 @@ void func_enmy2_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4)
Object_SetInfo(&effect->info, effect->obj.id);
}
void func_enmy2_8006A900(f32 xPos, f32 yPos, f32 zPos, f32 arg3) {
void func_enmy2_8006A900(f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
s32 i;
for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) {
if (gEffects[i].obj.status == OBJ_FREE) {
func_enmy2_8006A800(&gEffects[i], xPos, yPos, zPos, arg3);
func_enmy2_8006A800(&gEffects[i], xPos, yPos, zPos, scale2);
break;
}
}
@@ -75,7 +75,7 @@ void Actor237_Update(Actor237* this) {
void Actor237_Draw(Actor237* this) {
}
void Ovj54_8006A984(Effect* effect, f32 xPos, f32 yPos, f32 zPos) {
void Obj54_8006A984(Effect* effect, f32 xPos, f32 yPos, f32 zPos) {
Effect_Initialize(effect);
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_365;
@@ -97,7 +97,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) {
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
Ovj54_8006A984(&gEffects[i], xPos, yPos, zPos);
Obj54_8006A984(&gEffects[i], xPos, yPos, zPos);
break;
}
}
@@ -250,12 +250,12 @@ void Actor194_Init(Actor194* this) {
this->unk_04E = 0;
}
D_ctx_80176558[this->unk_046][this->unk_04E] = this->obj.pos.x;
D_ctx_80176878[this->unk_046][this->unk_04E] = this->obj.pos.y;
D_ctx_80176B98[this->unk_046][this->unk_04E] = this->obj.pos.z;
D_ctx_80176EB8[this->unk_046][this->unk_04E] = this->obj.rot.x;
D_ctx_801771D8[this->unk_046][this->unk_04E] = this->obj.rot.y;
D_ctx_80177500[this->unk_046][this->unk_04E] = this->obj.rot.z;
gActor194xPos[this->unk_046][this->unk_04E] = this->obj.pos.x;
gActor194yPos[this->unk_046][this->unk_04E] = this->obj.pos.y;
gActor194zPos[this->unk_046][this->unk_04E] = this->obj.pos.z;
gActor194xRot[this->unk_046][this->unk_04E] = this->obj.rot.x;
gActor194yRot[this->unk_046][this->unk_04E] = this->obj.rot.y;
gActor194zRot[this->unk_046][this->unk_04E] = this->obj.rot.z;
this->obj.rot.x -= 10.0f;
this->obj.rot.y += 3.0f;
@@ -270,11 +270,11 @@ void Actor194_Init(Actor194* this) {
if ((this->timer_0BC == 0) && ((gGameFrameCount % 4) == 0)) {
temp_hi = (D_800CFF94[this->unk_04A] + this->unk_04E) % 100;
if (this->unk_04A == 0) {
func_effect_8007D2C8(D_ctx_80176558[this->unk_046][temp_hi], D_ctx_80176878[this->unk_046][temp_hi],
D_ctx_80176B98[this->unk_046][temp_hi], 7.0f);
func_effect_8007D2C8(gActor194xPos[this->unk_046][temp_hi], gActor194yPos[this->unk_046][temp_hi],
gActor194zPos[this->unk_046][temp_hi], 7.0f);
} else {
func_effect_8007D2C8(D_ctx_80176558[this->unk_046][temp_hi], D_ctx_80176878[this->unk_046][temp_hi],
D_ctx_80176B98[this->unk_046][temp_hi], 4.0f);
func_effect_8007D2C8(gActor194xPos[this->unk_046][temp_hi], gActor194yPos[this->unk_046][temp_hi],
gActor194zPos[this->unk_046][temp_hi], 4.0f);
}
AUDIO_PLAY_SFX(0x2903B009, this->sfxSource, 4);
@@ -282,27 +282,27 @@ void Actor194_Init(Actor194* this) {
if (this->unk_04A > 15) {
Object_Kill(&this->obj, this->sfxSource);
D_ctx_80176550[this->unk_046] = 0;
gActor194Status[this->unk_046] = 0;
gHitCount += this->info.bonus;
D_ctx_80177850 = 15;
}
}
}
void Actor194_8006B46C(Actor194* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, u8 arg7, f32 arg8,
s32 arg9) {
void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 xRot, f32 yRot, f32 zRot, u8 arg7,
f32 scale, s32 arg9) {
Vec3f sp34 = { 0.0f, 0.0f, 0.0f };
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, arg1, arg2, arg3 + D_ctx_80177D20, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, xTrans, yTrans, zTrans + D_ctx_80177D20, MTXF_APPLY);
if (arg7 != 1) {
Matrix_RotateY(gGfxMatrix, M_DTOR * arg5, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_DTOR * arg4, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_DTOR * arg6, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY);
}
Matrix_Scale(gGfxMatrix, arg8, arg8, 1.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
if (arg7 != 1) {
@@ -334,9 +334,9 @@ void Actor194_Draw(Actor194* this) {
for (var_s0 = this->unk_04A; var_s0 < 16; var_s0++) {
temp_hi = (D_800CFF94[var_s0] + this->unk_04E) % 100;
Actor194_8006B46C(this, D_ctx_80176558[this->unk_046][temp_hi], D_ctx_80176878[this->unk_046][temp_hi],
D_ctx_80176B98[this->unk_046][temp_hi], D_ctx_80176EB8[this->unk_046][temp_hi],
D_ctx_801771D8[this->unk_046][temp_hi], D_ctx_80177500[this->unk_046][temp_hi],
Actor194_8006B46C(this, gActor194xPos[this->unk_046][temp_hi], gActor194yPos[this->unk_046][temp_hi],
gActor194zPos[this->unk_046][temp_hi], gActor194xRot[this->unk_046][temp_hi],
gActor194yRot[this->unk_046][temp_hi], gActor194zRot[this->unk_046][temp_hi],
D_800CFFB4[var_s0], D_800CFFC4[var_s0], this->timer_0C6 % 2U);
}
}
@@ -819,7 +819,7 @@ void Actor189_Update(Actor189* this) {
}
}
void func_enmy2_8006D0F4(Actor* actor) {
void func_enmy2_8006D0F4(Actor* this) {
s32 i;
s32 j;
f32* hitboxData;
@@ -843,9 +843,9 @@ void func_enmy2_8006D0F4(Actor* actor) {
if (count != 0) {
Matrix_RotateY(gCalcMatrix, -gObjects80[i].obj.rot.y * M_DTOR, MTXF_NEW);
spA8.x = actor->obj.pos.x - gObjects80[i].obj.pos.x;
spA8.y = actor->obj.pos.y - gObjects80[i].obj.pos.y;
spA8.z = actor->obj.pos.z - gObjects80[i].obj.pos.z;
spA8.x = this->obj.pos.x - gObjects80[i].obj.pos.x;
spA8.y = this->obj.pos.y - gObjects80[i].obj.pos.y;
spA8.z = this->obj.pos.z - gObjects80[i].obj.pos.z;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C);
@@ -861,7 +861,7 @@ void func_enmy2_8006D0F4(Actor* actor) {
D_ctx_80161A7C = 10;
D_ctx_80161A80 = 10;
D_ctx_80161A84 = 10;
actor->unk_0C8 = 5;
this->unk_0C8 = 5;
}
hitboxData += 6;
}
@@ -1083,12 +1083,12 @@ void ActorEvent_ProcessScript(ActorEvent* this) {
this->info.unk_1C = 1.0f;
for (i = 0; i < 2; i++) {
if (D_ctx_80176550[i] == 0) {
D_ctx_80176550[i] = 1;
if (gActor194Status[i] == 0) {
gActor194Status[i] = 1;
this->unk_046 = i;
for (j = 0; j < 100; j++) {
D_ctx_80176878[i][j] = this->obj.pos.y;
D_ctx_80176B98[i][j] = this->obj.pos.z;
gActor194yPos[i][j] = this->obj.pos.y;
gActor194zPos[i][j] = this->obj.pos.z;
}
if (this->unk_0B4 == EINFO_200) {
AUDIO_PLAY_SFX(0x11032049, this->sfxSource, 4);
@@ -1615,14 +1615,14 @@ void ActorEvent_8006EC60(f32 xPos, f32 yPos, f32 zPos) {
}
}
void func_enmy2_8006ECBC(PlayerShotId objId, PlayerShot* shot, s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 arg6,
f32 arg7, f32 arg8, f32 xRot, f32 yRot, f32 zRot) {
void func_enmy2_8006ECBC(PlayerShotId objId, PlayerShot* shot, s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel,
f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot) {
PlayerShot_Initialize(shot);
shot->obj.status = 1;
shot->vel.z = arg8;
shot->vel.x = arg6;
shot->vel.y = arg7;
shot->vel.z = zVel;
shot->vel.x = xVel;
shot->vel.y = yVel;
shot->obj.pos.x = xPos;
shot->obj.pos.y = yPos;
@@ -1660,33 +1660,33 @@ void func_enmy2_8006ECBC(PlayerShotId objId, PlayerShot* shot, s32 unk0E4, f32 x
}
}
void func_enmy2_8006EEFC(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6, f32 xRot, f32 yRot,
void func_enmy2_8006EEFC(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot,
f32 zRot) {
s32 i;
for (i = 0; i < 10; i++) {
if (gPlayerShots[i].obj.status == 0) {
func_enmy2_8006ECBC(PLAYERSHOT_1, &gPlayerShots[i], unk0E4, xPos, yPos, zPos, arg4, arg5, arg6, xRot, yRot,
func_enmy2_8006ECBC(PLAYERSHOT_1, &gPlayerShots[i], unk0E4, xPos, yPos, zPos, xVel, yVel, zVel, xRot, yRot,
zRot);
break;
}
}
}
void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6, f32 xRot, f32 yRot,
void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot,
f32 zRot) {
s32 i;
for (i = 0; i < 10; i++) {
if (gPlayerShots[i].obj.status == 0) {
func_enmy2_8006ECBC(PLAYERSHOT_9, &gPlayerShots[i], unk0E4, xPos, yPos, zPos, arg4, arg5, arg6, xRot, yRot,
func_enmy2_8006ECBC(PLAYERSHOT_9, &gPlayerShots[i], unk0E4, xPos, yPos, zPos, xVel, yVel, zVel, xRot, yRot,
zRot);
break;
}
}
}
void ActorEvent_8006F044(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
void ActorEvent_8006F044(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) {
Effect_Initialize(effect);
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_347;
@@ -1695,24 +1695,24 @@ void ActorEvent_8006F044(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4)
effect->obj.pos.y = yPos;
effect->obj.pos.z = zPos;
effect->scale1 = arg4;
effect->scale1 = scale1;
effect->unk_44 = 100;
Object_SetInfo(&effect->info, effect->obj.id);
func_effect_8007A6F0(&effect->obj.pos, 0x2903B009);
}
void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 arg3) {
void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
ActorEvent_8006F044(&gEffects[i], xPos, yPos, zPos, arg3);
ActorEvent_8006F044(&gEffects[i], xPos, yPos, zPos, scale1);
break;
}
}
}
void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) {
Effect_Initialize(effect);
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_394;
@@ -1721,7 +1721,7 @@ void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4)
effect->obj.pos.y = yPos;
effect->obj.pos.z = zPos;
effect->scale1 = arg4;
effect->scale1 = scale1;
effect->unk_44 = 100;
effect->unk_78 = 102;
effect->unk_7A = 18;
@@ -1730,12 +1730,12 @@ void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4)
func_effect_8007A6F0(&effect->obj.pos, 0x2903B009);
}
void ActorEvent_8006F1EC(f32 xPos, f32 yPos, f32 zPos, f32 arg3) {
void ActorEvent_8006F1EC(f32 xPos, f32 yPos, f32 zPos, f32 scale1) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
ActorEvent_8006F140(&gEffects[i], xPos, yPos, zPos, arg3);
ActorEvent_8006F140(&gEffects[i], xPos, yPos, zPos, scale1);
break;
}
}
@@ -2258,14 +2258,14 @@ void ActorEvent_80070BA8(ActorEvent* this) {
}
}
void ActorEvent_80070CEC(ActorEvent* this) {
if (this->iwork[3] < 200) {
void ActorEvent_TriggerBranch(ActorEvent* this) {
if (this->iwork[3] < EV_CHANGE_AI) {
this->aiIndex = this->iwork[3] * 2;
this->iwork[0] = 0;
this->iwork[2] = 0;
ActorEvent_ProcessScript(this);
} else {
this->aiType = this->iwork[3] - 200;
this->aiType = this->iwork[3] - EV_CHANGE_AI;
this->aiIndex = 0;
this->iwork[0] = 0;
this->iwork[2] = 0;
@@ -2287,7 +2287,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
if (this->iwork[2] >= EVC_CLOSE_Z) {
if (fabsf(this->obj.pos.z - gPlayer[0].unk_138) <= ((this->iwork[2] - EVC_CLOSE_Z) * 100.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
return;
}
@@ -2299,229 +2299,229 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
case EVC_1:
if ((gActors[this->iwork[1]].obj.status != OBJ_ACTIVE) || (gActors[this->iwork[1]].health <= 0) ||
(this->iwork[10] != gActors[this->iwork[1]].aiType)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TEAM_COUNT_3:
if (var_v1 == 3) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TEAM_COUNT_2:
if (var_v1 == 2) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TEAM_COUNT_1:
if (var_v1 == 1) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TEAM_COUNT_0:
if (var_v1 == 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_FALCO_ACTIVE:
if (gTeamShields[TEAM_ID_FALCO] > 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_PEPPY_ACTIVE:
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_SLIPPY_ACTIVE:
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_LEFT_100:
if (((this->obj.pos.x - gPlayer[0].pos.x) <= 100.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_LEFT_400:
if (((this->obj.pos.x - gPlayer[0].pos.x) <= 400.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_LEFT_700:
if (((this->obj.pos.x - gPlayer[0].pos.x) <= 700.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_LEFT_200:
if (((this->obj.pos.x - gPlayer[0].pos.x) <= 200.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_RIGHT_100:
if (((this->obj.pos.x - gPlayer[0].pos.x) >= -100.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_RIGHT_400:
if (((this->obj.pos.x - gPlayer[0].pos.x) >= -400.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_RIGHT_700:
if (((this->obj.pos.x - gPlayer[0].pos.x) >= -700.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_RIGHT_200:
if (((this->obj.pos.x - gPlayer[0].pos.x) >= -200.0f) && ((this->obj.pos.x - gPlayer[0].pos.x) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_ABOVE_100:
if (((this->obj.pos.y - gPlayer[0].pos.y) <= 100.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_ABOVE_400:
if (((this->obj.pos.y - gPlayer[0].pos.y) <= 400.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_ABOVE_700:
if (((this->obj.pos.y - gPlayer[0].pos.y) <= 700.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_ABOVE_200:
if (((this->obj.pos.y - gPlayer[0].pos.y) <= 200.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) >= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_BELOW_100:
if (((this->obj.pos.y - gPlayer[0].pos.y) >= -100.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_BELOW_400:
if (((this->obj.pos.y - gPlayer[0].pos.y) >= -400.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_BELOW_700:
if (((this->obj.pos.y - gPlayer[0].pos.y) >= -700.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_CLOSE_BELOW_200:
if (((this->obj.pos.y - gPlayer[0].pos.y) >= -200.0f) && ((this->obj.pos.y - gPlayer[0].pos.y) <= 0.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HEALTH_100p:
if (gPlayer[0].shields >= Play_GetMaxShields()) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HEALTH_75p:
if (gPlayer[0].shields >= (Play_GetMaxShields() * 3 / 4)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HEALTH_50p:
if (gPlayer[0].shields >= (Play_GetMaxShields() / 2)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HEALTH_25p:
if (gPlayer[0].shields >= (Play_GetMaxShields() / 4)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HEALTH_0p:
if (gPlayer[0].shields == 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK270_5PLUS:
if (gPlayer[0].unk_270 >= 5) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK270_NONZERO:
if (gPlayer[0].unk_270 != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK270_ZERO:
if (gPlayer[0].unk_270 == 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK250_GREATER_168:
if (gPlayer[0].unk_250 >= 16.8f) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK250_LESS_84:
if (gPlayer[0].unk_250 <= 8.4f) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_SINGLE_LASER:
if (gPlayer[0].wings.unk_14 > -8.0f) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TWIN_LASER:
if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_HYPER_LASER:
if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_UNK3_LASER:
if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
@@ -2531,7 +2531,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
(fabsf(this->obj.pos.x - gPlayerShots[i].obj.pos.x) < 150.0f) &&
(fabsf(this->obj.pos.y - gPlayerShots[i].obj.pos.y) < 150.0f) &&
(fabsf(this->obj.pos.z - gPlayerShots[i].obj.pos.z) < 150.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
break;
}
}
@@ -2543,7 +2543,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
(fabsf(this->obj.pos.x - gPlayerShots[i].obj.pos.x) < 300.0f) &&
(fabsf(this->obj.pos.y - gPlayerShots[i].obj.pos.y) < 300.0f) &&
(fabsf(this->obj.pos.z - gPlayerShots[i].obj.pos.z) < 300.0f)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
break;
}
}
@@ -2552,7 +2552,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
case EVC_41:
if ((gActors[this->iwork[9]].obj.status != OBJ_ACTIVE) ||
((gActors[this->iwork[9]].scale < 0.0f) && (this->health <= 0))) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
@@ -2563,14 +2563,14 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
return;
}
}
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
break;
case EVC_43:
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_EVENT) &&
(gActors[i].iwork[13] != 0) && (i != this->index) && (this->index == gActors[i].iwork[9])) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
break;
}
}
@@ -2578,7 +2578,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
case EVC_TOOK_DAMAGE:
if (this->unk_0D0 != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
@@ -2597,7 +2597,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
if (!((gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[TEAM_ID_FALCO] <= 0)) &&
(gRingPassCount >= var_v1_4)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
@@ -2605,7 +2605,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) {
if (((otherActor->obj.status == OBJ_DYING) || (otherActor->obj.status == OBJ_FREE)) &&
(otherActor->iwork[15] == this->iwork[15]) && (otherActor->iwork[16] != 0)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
}
break;
@@ -2615,127 +2615,127 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) {
func_8001AF40(0);
gCallVoiceParam = 0;
gCallTimer = 0;
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_WING_BROKEN:
if ((gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN)) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_ME_CLEAR:
if (D_play_800D3180[LEVEL_METEO] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_FO_CLEAR:
if (D_play_800D3180[LEVEL_FORTUNA] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_SX_CLEAR:
if (D_play_800D3180[LEVEL_SECTOR_X] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_TI_CLEAR:
if (D_play_800D3180[LEVEL_TITANIA] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_BO_CLEAR:
if (D_play_800D3180[LEVEL_BOLSE] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_SY_CLEAR:
if (D_play_800D3180[LEVEL_SECTOR_Y] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_KA_CLEAR:
if (D_play_800D3180[LEVEL_KATINA] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_SO_CLEAR:
if (D_play_800D3180[LEVEL_SOLAR] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_MA_CLEAR:
if (D_play_800D3180[LEVEL_MACBETH] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_AQ_CLEAR:
if (D_play_800D3180[LEVEL_AQUAS] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_ZO_CLEAR:
if (D_play_800D3180[LEVEL_ZONESS] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_SZ_CLEAR:
if (D_play_800D3180[LEVEL_SECTOR_Z] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_A6_CLEAR:
if (D_play_800D3180[LEVEL_AREA_6] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_62:
if (D_enmy_Timer_80161670[this->iwork[12]] == 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_63:
if (D_enmy_Timer_80161670[this->iwork[12]] != 0) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_MISSED_SEARCHLIGHT:
if (gMissedZoSearchlight) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_30_HITS:
if (gHitCount >= 30) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_80_HITS:
if (gHitCount >= 80) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
case EVC_EXPERT_MODE:
if (gExpertMode) {
ActorEvent_80070CEC(this);
ActorEvent_TriggerBranch(this);
}
break;
}
@@ -2986,12 +2986,12 @@ void ActorEvent_Update(ActorEvent* this) {
this->unk_04E = 0;
}
D_ctx_80176558[this->unk_046][this->unk_04E] = this->obj.pos.x;
D_ctx_80176878[this->unk_046][this->unk_04E] = this->obj.pos.y;
D_ctx_80176B98[this->unk_046][this->unk_04E] = this->obj.pos.z;
D_ctx_80176EB8[this->unk_046][this->unk_04E] = this->obj.rot.x;
D_ctx_801771D8[this->unk_046][this->unk_04E] = this->obj.rot.y;
D_ctx_80177500[this->unk_046][this->unk_04E] = this->obj.rot.z;
gActor194xPos[this->unk_046][this->unk_04E] = this->obj.pos.x;
gActor194yPos[this->unk_046][this->unk_04E] = this->obj.pos.y;
gActor194zPos[this->unk_046][this->unk_04E] = this->obj.pos.z;
gActor194xRot[this->unk_046][this->unk_04E] = this->obj.rot.x;
gActor194yRot[this->unk_046][this->unk_04E] = this->obj.rot.y;
gActor194zRot[this->unk_046][this->unk_04E] = this->obj.rot.z;
if (this->unk_0D0 != 0) {
this->unk_0D0 = 0;
@@ -3846,12 +3846,12 @@ void ActorEvent_Draw(ActorEvent* this) {
switch (this->unk_0B4) {
case EINFO_56:
func_demo_800515C4();
Cutscene_DrawGreatFox();
break;
case EINFO_0:
this->iwork[11] = 1;
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case EINFO_2:
@@ -3878,12 +3878,12 @@ void ActorEvent_Draw(ActorEvent* this) {
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870);
}
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case EINFO_5:
this->iwork[11] = 1;
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case EINFO_6:
@@ -3900,7 +3900,7 @@ void ActorEvent_Draw(ActorEvent* this) {
case EINFO_7:
this->iwork[11] = 1;
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case EINFO_9:
@@ -3914,7 +3914,7 @@ void ActorEvent_Draw(ActorEvent* this) {
this->iwork[11] = 1;
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
}
break;
@@ -3923,7 +3923,7 @@ void ActorEvent_Draw(ActorEvent* this) {
this->iwork[11] = 1;
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY);
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
}
break;
@@ -3938,7 +3938,7 @@ void ActorEvent_Draw(ActorEvent* this) {
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
this->iwork[11] = 1;
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
break;
case EINFO_22:
@@ -3947,7 +3947,7 @@ void ActorEvent_Draw(ActorEvent* this) {
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
this->iwork[11] = 1;
func_edisplay_8005B1E8(this, 2);
Actor_DrawEngineGlow(this, 2);
break;
case EINFO_27:
@@ -4068,12 +4068,12 @@ void ActorEvent_Draw(ActorEvent* this) {
case EINFO_85:
gSPDisplayList(gMasterDisp++, D_D00B880);
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case EINFO_86:
gSPDisplayList(gMasterDisp++, D_D009A40);
func_edisplay_8005ADAC(this);
Actor_DrawEngineAndContrails(this);
break;
case EINFO_88:
@@ -4380,5 +4380,5 @@ void Actor234_Update(Actor234* this) {
}
void Actor234_Draw(Actor234* this) {
func_demo_800515C4();
Cutscene_DrawGreatFox();
}
+11 -11
View File
@@ -15,9 +15,9 @@ u16 D_game_80161A34;
u16 gBgColor;
u8 gBlurAlpha;
u8 D_game_80161A39;
f32 D_game_80161A3C;
f32 D_game_80161A40;
f32 D_game_80161A44;
f32 gFovY;
f32 gProjectNear;
f32 gProjectFar;
s32 gShowCrosshairs[4] = { true, true, true, true };
s32 D_game_800D2870 = 0;
@@ -57,9 +57,9 @@ void Game_Initialize(void) {
gNextGameStateTimer = 0;
gBgColor = 0;
gBlurAlpha = 255;
D_game_80161A3C = 45.0f;
D_game_80161A40 = 10.0f;
D_game_80161A44 = 12800.0f;
gFovY = 45.0f;
gProjectNear = 10.0f;
gProjectFar = 12800.0f;
D_game_80161A10 = D_game_80161A14 = 0.0f;
gOverlaySetup = OVL_SETUP_LOGO;
gOverlayStage = 0;
@@ -93,7 +93,7 @@ void Game_SetGameState(void) {
break;
}
Memory_FreeAll();
func_play_800A6148();
Play_ClearObjectData();
gGameState = gNextGameState;
gNextGameStateTimer = 3;
gAllRangeCheckpoint = 0;
@@ -386,7 +386,7 @@ void Game_Update(void) {
D_ctx_80177AE0 = 1;
D_ctx_80177824 = 1;
Memory_FreeAll();
func_play_800A6148();
Play_ClearObjectData();
gCamCount = 1;
gLifeCount[0] = 2;
D_ctx_80177D20 = 0.0f;
@@ -495,16 +495,16 @@ void Game_Update(void) {
gDPSetCycleType(gMasterDisp++, G_CYC_1CYCLE);
gDPSetCombineMode(gMasterDisp++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetRenderMode(gMasterDisp++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x0, 0, 0, 0, 0);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 0);
gDPFillRectangle(gMasterDisp++, SCREEN_WIDTH / 2 - 2 - 1, SCREEN_MARGIN, SCREEN_WIDTH / 2 + 2,
SCREEN_HEIGHT - SCREEN_MARGIN);
gDPFillRectangle(gMasterDisp++, SCREEN_MARGIN, SCREEN_HEIGHT / 2 - 2 - 1, SCREEN_WIDTH - SCREEN_MARGIN,
SCREEN_HEIGHT / 2 + 2);
if (gLevelType == LEVELTYPE_PLANET) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x0, 0, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x0, 100, 100, 255, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 100, 100, 255, 255);
}
gDPFillRectangle(gMasterDisp++, SCREEN_WIDTH / 2 - 1 - 1, SCREEN_MARGIN, SCREEN_WIDTH / 2 + 1,
SCREEN_HEIGHT - SCREEN_MARGIN);
+30 -31
View File
@@ -226,15 +226,15 @@ void func_hud_80084B94(s32 arg0) {
}
}
void func_hud_80084E78(Gfx** gfxP, void* arg1, void* arg2, u32 arg3, u32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,
f32 arg9, f32 argA) {
void func_hud_80084E78(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tHeight, f32 xPos, f32 yPos, f32 xScale,
f32 yScale, f32 xWidth, f32 yWidth) {
gDPPipeSync((*gfxP)++);
gDPLoadTLUT((*gfxP)++, 256, 256, arg2);
gDPLoadTextureBlock((*gfxP)++, arg1, G_IM_FMT_CI, G_IM_SIZ_8b, arg3, arg4, 0, G_TX_NOMIRROR, G_TX_NOMIRROR,
gDPLoadTLUT((*gfxP)++, 256, 256, palette);
gDPLoadTextureBlock((*gfxP)++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, tWidth, tHeight, 0, G_TX_NOMIRROR, G_TX_NOMIRROR,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle((*gfxP)++, (arg5 * 4.0f), (arg6 * 4.0f), ((arg5 + (arg9 * arg7)) * 4.0f),
((arg6 + (argA * arg8)) * 4.0f), G_TX_RENDERTILE, 0 * 32, 0 * 32, (s32) (1 / arg7 * (32 * 32)),
(s32) (1 / arg8 * (32 * 32)));
gSPTextureRectangle((*gfxP)++, (xPos * 4.0f), (yPos * 4.0f), ((xPos + (xWidth * xScale)) * 4.0f),
((yPos + (yWidth * yScale)) * 4.0f), G_TX_RENDERTILE, 0 * 32, 0 * 32,
(s32) (1 / xScale * (32 * 32)), (s32) (1 / yScale * (32 * 32)));
}
void func_hud_800853A4(f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
@@ -274,7 +274,7 @@ void func_hud_8008566C(f32 x, f32 y, f32 arg2, f32 arg3) {
}
void func_hud_800856C0(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
func_hud_80084E78(&gMasterDisp, &D_1013580, &D_1013700, 48, 12, arg0, arg1, arg2, arg3, 48.0f * arg4, 8.0f);
func_hud_80084E78(&gMasterDisp, D_1013580, D_1013700, 48, 12, arg0, arg1, arg2, arg3, 48.0f * arg4, 8.0f);
}
void func_hud_80085740(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
@@ -686,9 +686,8 @@ void func_hud_800869A0(f32 arg0, f32 arg1, s32 k, f32 arg3, s32 arg4, s32 arg5)
s32 i;
s32 j;
u16* D_800D1CD4[] = {
(u16*) D_5009F60, (u16*) D_500A050, (u16*) D_500A140, (u16*) D_500A230, (u16*) D_500A320,
(u16*) D_500A410, (u16*) D_500A500, (u16*) D_500A5F0, (u16*) D_500A6E0, (u16*) D_500A7D0,
u8* D_800D1CD4[] = {
D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0,
};
if (arg4 != 0) {
@@ -796,7 +795,7 @@ void func_hud_80086DCC(void) {
if ((gLevelClearScreenTimer == 92) || (gLevelClearScreenTimer == 87) || (gLevelClearScreenTimer == 82) ||
(gLevelClearScreenTimer == 77)) {
AUDIO_PLAY_SFX(0x49008031U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49008031, gDefaultSfxSource, 4);
}
} else {
if (gLevelClearScreenTimer <= 100) {
@@ -824,9 +823,9 @@ void func_hud_80086DCC(void) {
if ((gLevelClearScreenTimer == 80) || (gLevelClearScreenTimer == 72) || (gLevelClearScreenTimer == 64) ||
(gLevelClearScreenTimer == 56)) {
if (!boolTemp) {
AUDIO_PLAY_SFX(0x49008034U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49008034, gDefaultSfxSource, 4);
} else {
AUDIO_PLAY_SFX(0x49008031U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49008031, gDefaultSfxSource, 4);
}
}
}
@@ -1054,7 +1053,7 @@ void func_hud_80087B5C(void) {
f32 y6;
if (D_ctx_80177830 == 0) {
Audio_KillSfxById(0x41007012U);
Audio_KillSfxById(0x41007012);
D_801617C0[0] = 0;
}
@@ -1084,20 +1083,20 @@ void func_hud_80087B5C(void) {
if (((gTeamShields[TEAM_ID_FALCO] > 0) && (gTeamShields[TEAM_ID_FALCO] < 255)) &&
((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_SLIPPY] < 255)) &&
((gTeamShields[TEAM_ID_PEPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] < 255))) {
AUDIO_PLAY_SFX(0x41007012U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x41007012, gDefaultSfxSource, 4);
}
D_801617C0[0] = 2;
case 2:
if ((D_801617C0[5] == 0) && (D_801617C0[4] == 0)) {
Audio_KillSfxById(0x41007012U);
Audio_KillSfxById(0x41007012);
D_801617C0[0] = 3;
D_801617E8[0] = 30;
break;
}
if (D_801617C0[5] > 0) {
AUDIO_PLAY_SFX(0x49004007U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4);
if (D_801617C0[5] >= 100) {
D_801617C0[5] -= 100;
@@ -1136,7 +1135,7 @@ void func_hud_80087B5C(void) {
if ((D_801617C0[i] == 0) || (temp == 0)) {
D_801617C0[4] = 0;
Audio_KillSfxById(0x41007012U);
Audio_KillSfxById(0x41007012);
}
}
break;
@@ -1155,7 +1154,7 @@ void func_hud_80087B5C(void) {
D_801617C0[0]++;
} else {
if (((gGameFrameCount % 2) == 0)) {
AUDIO_PLAY_SFX(0x4900C024U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x4900C024, gDefaultSfxSource, 4);
D_801617C0[3]++;
}
}
@@ -1430,7 +1429,7 @@ void func_hud_80088970(void) {
D_80161838[0] = 0;
if (((ret > 0) && (D_80161810[1] == 1)) || ((ret < 0) && (D_80161810[1] == 0))) {
D_80161810[1] ^= 1;
AUDIO_PLAY_SFX(0x49000002U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4);
}
}
@@ -1463,7 +1462,7 @@ void func_hud_80088970(void) {
gRadioState = 0;
func_play_800A6148();
Play_ClearObjectData();
gShowBossHealth = false;
gFillScreenAlpha = 255;
@@ -1824,7 +1823,7 @@ void func_hud_80089D28(void) {
if ((gb == 10) || (gb == 0)) {
// clang-format off
//! FAKE: Probably a MACRO
if (1) {AUDIO_PLAY_SFX(0x4900001c, gDefaultSfxSource, 4);}
if (1) {AUDIO_PLAY_SFX(0x4900001C, gDefaultSfxSource, 4);}
// clang-format on
}
@@ -2523,7 +2522,7 @@ void func_hud_8008B9E8(void) {
}
if ((D_80161788 == 0) && (D_8016178C == 0)) {
if ((gRadioState >= 4) && (D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3)) {
if ((gRadioState >= 4) && (D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) {
temp = func_hud_8008B774();
if (temp == 1) {
D_80161788 = 20;
@@ -2536,7 +2535,7 @@ void func_hud_8008B9E8(void) {
}
}
if ((D_ctx_801782A4 == 2) || (D_ctx_801782A4 == 3)) {
if ((D_ctx_801782A4 == RCID_STATIC) || (D_ctx_801782A4 == RCID_STATIC_FLIP)) {
D_80161788 = 0;
D_8016178C = 0;
}
@@ -3718,8 +3717,8 @@ s32 func_hud_80090200(Boss* boss) {
switch (boss->swork[1]) {
case 0:
AUDIO_PLAY_SFX(0x11000011U, boss->sfxSource, 0U);
AUDIO_PLAY_SFX(0x3140402EU, boss->sfxSource, 0U);
AUDIO_PLAY_SFX(0x11000011, boss->sfxSource, 0);
AUDIO_PLAY_SFX(0x3140402E, boss->sfxSource, 0);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
@@ -4680,7 +4679,7 @@ void ActorTeamBoss_Init(Actor* actor) {
actor->unk_0C9 = 1;
}
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U);
AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4);
if (((s32) (D_hud_800D1970 % 4U) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) {
Object_Kill(&actor->obj, actor->sfxSource);
@@ -5131,7 +5130,7 @@ void func_hud_800935E8(Player* player) {
}
if (player->timer_1F8 == 774) {
AUDIO_PLAY_SFX(0x01038026U, player->sfxSource, 0U);
AUDIO_PLAY_SFX(0x01038026, player->sfxSource, 0);
D_ctx_80177A10[9] = 40;
}
@@ -5748,7 +5747,7 @@ void func_hud_80095604(Player* player) {
gAmbientG = 30;
gAmbientB = 50;
func_play_800A6148();
Play_ClearObjectData();
player->unk_144 = D_ctx_80177D20 = 0;
@@ -6053,7 +6052,7 @@ void func_hud_80096A74(Player* player) {
player->unk_190 = player->unk_194 = 10.0f;
player->unk_1D0 = 2;
D_ctx_80177A48[1] = 400.0f;
AUDIO_PLAY_SFX(0x09004002U, player->sfxSource, 0U);
AUDIO_PLAY_SFX(0x09004002, player->sfxSource, 0);
}
break;
+19 -19
View File
@@ -31,7 +31,7 @@ s32 Message_GetWidth(u16* msgPtr) {
u16* msgChar = msgPtr;
while (*msgChar != MSGCHAR_END) {
if (*msgChar > 15 || *msgChar == 12) {
if ((*msgChar >= MSGCHAR_CLF) || (*msgChar == MSGCHAR_SPC)) {
width++;
}
msgChar++;
@@ -43,7 +43,7 @@ s32 Message_GetCharCount(u16* msgPtr) {
s32 count = 0;
u16* msgChar = msgPtr;
while (*msgChar != 0) {
while (*msgChar != MSGCHAR_END) {
count++;
msgChar++;
}
@@ -104,7 +104,7 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len)
case MSGCHAR_PRI3:
case MSGCHAR_QSP:
case MSGCHAR_HSP:
case MSGCHAR_NPF:
case MSGCHAR_NXT:
break;
}
}
@@ -150,7 +150,7 @@ void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos,
case MSGCHAR_PRI1:
case MSGCHAR_PRI2:
case MSGCHAR_PRI3:
case MSGCHAR_NPF:
case MSGCHAR_NXT:
break;
}
}
@@ -164,21 +164,21 @@ bool Message_IsPrintingChar(u16* msgPtr, s32 charPos) {
for (i = 0; msgPtr[i] != 0 && i < charPos; i++) {
print = false;
switch (msgPtr[i]) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case MSGCHAR_NWL:
case MSGCHAR_NP2:
case MSGCHAR_NP3:
case MSGCHAR_NP4:
case MSGCHAR_NP5:
case MSGCHAR_NP6:
case MSGCHAR_NP7:
case MSGCHAR_PRI0:
case MSGCHAR_PRI1:
case MSGCHAR_PRI2:
case MSGCHAR_PRI3:
case MSGCHAR_SPC:
case MSGCHAR_QSP:
case MSGCHAR_HSP:
case MSGCHAR_NXT:
break;
default:
print = true;
+61 -62
View File
@@ -153,7 +153,7 @@ void func_play_800A4460(Player* player) {
player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f;
player->unk_088 += 10.0f;
player->unk_0F4 += 8.0f;
if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == 1) && (gLevelMode == LEVELMODE_ON_RAILS))) {
if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) {
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) {
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 5.0f;
@@ -168,7 +168,7 @@ void func_play_800A46A0(Player* player) {
s32 var_v1;
f32 sp40;
if ((player->cockpitView == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (player->wings.rightState <= WINGSTATE_BROKEN) {
if (((gGameFrameCount % 2U) == 0) && (D_ctx_80177D70[player->num] != 0)) {
func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y,
@@ -203,7 +203,7 @@ void func_play_800A46A0(Player* player) {
if (player->shields > 48) {
var_v1 = 64 - 1;
}
if ((player->cockpitView == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
sp40 = 0.0f;
if (player->form == FORM_LANDMASTER) {
sp40 = 30.0f;
@@ -522,10 +522,10 @@ void func_play_800A594C(void) {
D_ctx_801784D0 = D_ctx_801784F8 = D_ctx_80178520 = D_ctx_801784B8 = D_ctx_801784C4 = sEnvSettings->unk_20.x;
D_ctx_801784D4 = D_ctx_801784FC = D_ctx_80178524 = D_ctx_801784BC = D_ctx_801784C8 = sEnvSettings->unk_20.y;
D_ctx_801784D8 = D_ctx_80178500 = D_ctx_80178528 = D_ctx_801784C0 = D_ctx_801784CC = sEnvSettings->unk_20.z;
D_game_80161A44 = 12800.0f;
gProjectFar = 12800.0f;
D_ctx_80178540 = 40;
D_ctx_80178544 = 40;
D_game_80161A3C = 45.0f;
gFovY = 45.0f;
}
void func_play_800A5D6C(void) {
@@ -614,7 +614,7 @@ void RadarMark_Initialize(RadarMark* radarMark) {
}
}
void func_play_800A6148(void) {
void Play_ClearObjectData(void) {
s16 i;
s16 j;
@@ -661,10 +661,10 @@ void func_play_800A6148(void) {
for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) {
gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f;
}
for (i = 0; i < ARRAY_COUNT(D_ctx_80176878); i++) {
D_ctx_80176550[i] = 0;
for (j = 0; j < ARRAY_COUNT(*D_ctx_80176878); j++) {
D_ctx_80176878[i][j] = -5000.0f;
for (i = 0; i < ARRAY_COUNT(gActor194yPos); i++) {
gActor194Status[i] = 0;
for (j = 0; j < ARRAY_COUNT(*gActor194yPos); j++) {
gActor194yPos[i][j] = -5000.0f;
}
}
}
@@ -2354,7 +2354,7 @@ void func_play_800AB2AC(void) {
}
}
void func_play_800AB304(Player* player) {
void Player_Initialize(Player* player) {
u8* ptr = (u8*) player;
u32 i;
@@ -2521,12 +2521,12 @@ void func_play_800ABA08(void) {
func_play_800AB964();
for (i = 0; i < 4; i++) {
gPlayerNum = i;
func_play_800AB304(&gPlayer[i]);
Player_Initialize(&gPlayer[i]);
func_play_800B0F50(&gPlayer[i]);
func_play_800B44C4(&gPlayer[i]);
func_play_800B7184(&gPlayer[i], 1);
}
func_play_800A6148();
Play_ClearObjectData();
}
void Play_Init(void) {
@@ -2545,8 +2545,8 @@ void Play_Init(void) {
gPauseEnabled = 0;
gVIsPerFrame = 2;
D_ctx_80177C70 = 0;
D_display_800CA234 = NULL;
D_display_Timer_800CA238 = 0;
gTeamHelpActor = NULL;
gTeamHelpTimer = 0;
Audio_KillSfxById(0x11403076);
Audio_KillSfxById(0x49000014);
Memory_FreeAll();
@@ -2614,7 +2614,7 @@ void Play_Init(void) {
D_ctx_801784E8 = 5.0f;
D_ctx_80178510 = 5.0f;
D_ctx_80178538 = 5.0f;
func_play_800A6148();
Play_ClearObjectData();
D_ctx_801782C8 = 0;
if (gCurrentLevel == LEVEL_TITANIA) {
Ground_801B5110(0.0f, 0.0f, 200.0f);
@@ -2647,29 +2647,29 @@ void Play_Init(void) {
case LEVEL_SECTOR_Z:
if (D_ctx_8017782C == 0) {
SectorZ_8019EA68();
func_360_8002F180();
ActorAllRange_SpawnTeam();
}
break;
case LEVEL_FORTUNA:
Fortuna_8018BA2C();
func_360_8002F180();
ActorAllRange_SpawnTeam();
break;
case LEVEL_KATINA:
Katina_80198930();
if (D_ctx_8017782C == 0) {
func_360_8002F180();
ActorAllRange_SpawnTeam();
}
break;
case LEVEL_BOLSE:
if (D_ctx_8017782C == 0) {
Bolse_80191ED8();
func_360_8002F180();
ActorAllRange_SpawnTeam();
}
break;
case LEVEL_VENOM_2:
Venom2_80196968();
if (gLevelStage == 0) {
func_360_8002F180();
ActorAllRange_SpawnTeam();
}
break;
case LEVEL_VENOM_ANDROSS:
@@ -3227,7 +3227,7 @@ void func_play_800ADF58(Player* player) {
player->unk_144 = 0.0f;
player->pos.z = 0.0f;
D_ctx_80177DC8 = 0;
func_play_800A6148();
Play_ClearObjectData();
}
player->unk_138 = player->pos.z + player->unk_08C;
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
@@ -3481,13 +3481,13 @@ void func_play_800AECAC(Player* player) {
player->unk_190 = 2;
Math_SmoothStepToF(&player->unk_4D8, 360.0f, 0.1f, 5.0f, 0.001f);
if (player->unk_4D8 > 350.0f) {
player->unk_4DC = 0;
player->somersault = false;
if (gLevelMode != LEVELMODE_ON_RAILS) {
player->unk_018 = 0.05f;
player->unk_014 = 0.05f;
} else {
player->cockpitView = player->savedCockpitView;
if (player->cockpitView != 0) {
if (player->cockpitView) {
player->unk_014 = 0.0f;
}
}
@@ -3546,7 +3546,7 @@ void func_play_800AF07C(Player* player) {
Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f);
if (player->cockpitView != 0) {
if (player->cockpitView) {
Matrix_RotateZ(gCalcMatrix, player->unk_12C * M_DTOR, MTXF_NEW);
sp68.z = 0.0f;
@@ -4600,16 +4600,16 @@ void func_play_800B2574(Player* player) {
if (D_Timer_80177A88[gPlayerNum] != 0) {
D_Timer_80177A88[gPlayerNum]--;
}
if ((player->unk_4DC == 0) && (D_ctx_80177AB0 < 5)) {
if (!player->somersault && (D_ctx_80177AB0 < 5)) {
if (var >= -50) {
D_Timer_80177A70[gPlayerNum] = 5;
}
if ((D_Timer_80177A70[gPlayerNum] > 0) && (D_Timer_80177A70[gPlayerNum] < 5) &&
(D_Timer_80177A88[gPlayerNum] != 0)) {
player->unk_4DC = 1;
player->somersault = true;
if (gLevelMode == LEVELMODE_ON_RAILS) {
player->savedCockpitView = player->cockpitView;
player->cockpitView = 0;
player->cockpitView = false;
}
player->unk_014 = player->unk_018 = 0.0f;
if (player->unk_4D8 > 340.0f) {
@@ -5120,7 +5120,7 @@ void func_play_800B42B0(Player* player) {
func_play_800B2C00(player);
func_play_800B41E0(player);
func_play_800B2130(player);
if (player->unk_4DC != 0) {
if (player->somersault) {
func_play_800AECAC(player);
} else {
func_play_800AF07C(player);
@@ -5173,7 +5173,7 @@ void func_play_800B44C4(Player* player) {
func_play_800B2C00(player);
func_play_800B41E0(player);
func_play_800B2130(player);
if (player->unk_4DC != 0) {
if (player->somersault) {
func_play_800AECAC(player);
} else {
func_play_800AE4A4(player);
@@ -5351,8 +5351,7 @@ void Player_Update(Player* player) {
func_play_800B46F8(player);
player->wings.modelId = 0;
D_hud_80161704 = 255;
if ((!gVersusMode || (D_ctx_80177E7C != 0)) && (player->unk_4DC == 0) &&
(gInputPress->button & U_CBUTTONS) &&
if ((!gVersusMode || (D_ctx_80177E7C != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) &&
((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) {
if (player->cockpitView = 1 - player->cockpitView) {
AUDIO_PLAY_SFX(0x4900002C, gDefaultSfxSource, 4);
@@ -5430,8 +5429,8 @@ void Player_Update(Player* player) {
}
break;
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
player->cockpitView = 0;
gPauseEnabled = 0;
player->cockpitView = false;
gPauseEnabled = false;
func_play_800B40AC(player);
Cutscene_LevelComplete(player);
func_play_800A4C40(player);
@@ -5467,7 +5466,7 @@ void Player_Update(Player* player) {
func_play_800B5FBC(player, player->unk_288 - 1, 0);
} else if ((D_ctx_80177E74 == 0) && (player->unk_1D0 != 0)) {
player->unk_1D0 = 0;
func_play_800AB304(player);
Player_Initialize(player);
func_play_800B0F50(player);
func_play_800B44C4(player);
func_play_800B7184(player, 1);
@@ -5505,7 +5504,7 @@ void Player_Update(Player* player) {
gFillScreenAlphaTarget = 255;
}
if (gFillScreenAlpha == 255) {
func_play_800A6148();
Play_ClearObjectData();
D_ctx_80177D20 = gPlayer[0].unk_144 = 0.0f;
gPlayerFillScreenAlphas[0] = 0;
gShowAllRangeCountdown = gRadioState = 0;
@@ -5596,7 +5595,7 @@ void func_play_800B56BC(Player* player) {
var_fv1 = gInputPress->stick_x;
var_fv0 = -gInputPress->stick_y;
if ((player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) || (player->unk_4DC != 0)) {
if ((player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) || player->somersault) {
var_fv0 = 0.0f;
var_fv1 = 0;
}
@@ -5632,7 +5631,7 @@ void func_play_800B56BC(Player* player) {
if (D_ctx_80177C70 == 2) {
gCsCamEyeZ -= 50.0f;
}
if (player->unk_4DC != 0) {
if (player->somersault) {
gCsCamEyeZ += 200.0f;
gCsCamAtY = (player->pos.y - player->unk_0B0) * 0.9f;
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.1f, 8.0f, 0.0f);
@@ -5778,12 +5777,12 @@ void func_play_800B63BC(Player* player, s32 arg1) {
Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, MTXF_APPLY);
sp74.x = 0.0f;
sp74.y = 0.0f;
if (player->cockpitView != 0) {
if (player->cockpitView) {
sp74.z = 1000.0f - player->unk_08C;
} else {
sp74.z = 300.0f - player->unk_08C;
}
if (player->unk_4DC != 0) {
if (player->somersault) {
sp74.z += 500.0f;
}
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68);
@@ -5800,7 +5799,7 @@ void func_play_800B63BC(Player* player, s32 arg1) {
atX = player->pos.x + player->unk_134;
var_fv0 = (player->unk_4DC != 0) ? 1.0f : 0.79f;
var_fv0 = (player->somersault) ? 1.0f : 0.79f;
atY = (player->pos.y * (var_fv0)) + player->unk_134 + (player->unk_060 * 5.0f);
atY += (player->unk_02C * 0.5f);
if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) {
@@ -5935,32 +5934,32 @@ void func_play_800B6BFC(Player* player, s32 arg1) {
}
}
void func_play_800B6F50(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
void func_play_800B6F50(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt) {
f32 sp34;
f32 sp30;
f32 sp2C;
f32 sp28;
f32 var_ft5;
f32 pitch;
f32 yaw;
f32 tempf;
f32 sp20;
sp28 = -Math_Atan2F(arg0 - arg3, arg2 - arg5);
var_ft5 = sqrtf(SQ(arg2 - arg5) + SQ(arg0 - arg3));
sp2C = -Math_Atan2F(arg1 - arg4, var_ft5);
if (sp28 >= M_PI / 2) {
sp28 -= M_PI;
yaw = -Math_Atan2F(xEye - xAt, zEye - zAt);
tempf = sqrtf(SQ(zEye - zAt) + SQ(xEye - xAt));
pitch = -Math_Atan2F(yEye - yAt, tempf);
if (yaw >= M_PI / 2) {
yaw -= M_PI;
}
if (sp28 <= -M_PI / 2) {
sp28 += M_PI;
if (yaw <= -M_PI / 2) {
yaw += M_PI;
}
var_ft5 = 0.0f;
tempf = 0.0f;
if (gCurrentLevel == LEVEL_UNK_15) {
var_ft5 = gPlayer[0].cam.eye.y * 0.03f;
tempf = gPlayer[0].cam.eye.y * 0.03f;
}
sp30 = (2.0f * (-sp2C * (-8.0f / 3.0f * M_RTOD))) + 3000.0f + D_ctx_80178430 + var_ft5;
sp34 = (2.0f * (sp28 * (-8.0f / 3.0f * M_RTOD))) + 3000.0f + D_ctx_8017842C;
sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + D_ctx_80178430 + tempf;
sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + D_ctx_8017842C;
sp20 = D_ctx_80178420;
D_ctx_80178420 = Math_ModF(sp34, 480.0f);
D_ctx_80178424 = Math_ModF(sp30, 360.0f);
D_ctx_80178420 = Math_ModF(sp34, SCREEN_WIDTH * 1.5f);
D_ctx_80178424 = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f);
if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
(gCurrentLevel == LEVEL_METEO)) {
if (fabsf(D_ctx_80178420 - sp20) < 50.0f) {
@@ -5992,7 +5991,7 @@ void Player_UpdateCamera(Player* player) {
switch (gLevelMode) {
case LEVELMODE_ON_RAILS:
if (player->form == FORM_ARWING) {
if (player->cockpitView == 0) {
if (!player->cockpitView) {
func_play_800B56BC(player);
} else {
func_play_800B5D30(player, 0);
@@ -6382,7 +6381,7 @@ void Play_Main(void) {
sp34 = 55.0f;
break;
}
Math_SmoothStepToF(&D_game_80161A3C, sp34, 0.1f, 5.0f, 0.0f);
Math_SmoothStepToF(&gFovY, sp34, 0.1f, 5.0f, 0.0f);
if (gChangeTo360) {
gChangeTo360 = false;
gLevelMode = LEVELMODE_ALL_RANGE;
@@ -6392,7 +6391,7 @@ void Play_Main(void) {
for (i = 0; i < 200; i++) {
gObjects58[i].obj.status = OBJ_FREE;
}
func_play_800A6148();
Play_ClearObjectData();
if (gCurrentLevel == LEVEL_CORNERIA) {
func_play_800A5338();
} else if (gCurrentLevel == LEVEL_SECTOR_Y) {
@@ -6438,7 +6437,7 @@ void Play_Main(void) {
gSaveFile.save.data.planet[D_800D2F6C[gCurrentLevel]].normalClear) {
Audio_ClearVoice();
Audio_SetBaseSfxReverb(0);
func_play_800A6148();
Play_ClearObjectData();
for (i = 0; i < gCamCount; i++) {
Audio_KillSfxBySource(gPlayer[i].sfxSource);
func_8001CA24(i);
+35 -31
View File
@@ -512,7 +512,7 @@ void func_radio_800BB5D0(void) {
switch (gRadioState) {
case 100:
D_radio_80178748 = 1;
D_ctx_801782A4 = 1000;
D_ctx_801782A4 = RCID_1000;
gRadioState = 1;
D_ctx_801782D8 = 0;
D_ctx_80177D38 = 0.0f;
@@ -529,9 +529,9 @@ void func_radio_800BB5D0(void) {
gRadioState++;
D_Timer_801782AC = 10;
}
D_ctx_801782A4 = 2;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
break;
@@ -540,9 +540,9 @@ void func_radio_800BB5D0(void) {
gRadioState++;
D_Timer_801782AC = 10;
}
D_ctx_801782A4 = 2;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
break;
@@ -605,7 +605,7 @@ void func_radio_800BB5D0(void) {
temp_v0 = Audio_GetCurrentVoiceStatus();
if (D_ctx_801782D8 < 60) {
if (D_ctx_80178308[D_ctx_801782D8 + 1] == MSGCHAR_NPF) {
if (D_ctx_80178308[D_ctx_801782D8 + 1] == MSGCHAR_NXT) {
if (temp_v0 == 0) {
gRadioState = 31;
}
@@ -616,7 +616,7 @@ void func_radio_800BB5D0(void) {
if (D_radio_8017874C != 0) {
if ((D_ctx_801782E8 >= 23000) && (D_ctx_801782E8 < 23033)) {
if (D_ctx_801782F8 != 0) {
if (D_ctx_801782F8) {
D_Timer_801782B4 = 2;
AUDIO_PLAY_SFX(0x49000017, gDefaultSfxSource, 4);
}
@@ -647,9 +647,9 @@ void func_radio_800BB5D0(void) {
}
gRadioState++;
}
D_ctx_801782A4 = 2;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
D_ctx_80177D50 -= 0.26f;
if (D_ctx_80177D50 < 0.0f) {
@@ -664,9 +664,9 @@ void func_radio_800BB5D0(void) {
gCurrentMsgPri = 0;
gRadioState = 0;
}
D_ctx_801782A4 = 2;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
break;
@@ -697,13 +697,15 @@ void func_radio_800BB5D0(void) {
var_v1 = TEAM_ID_PEPPY;
}
if ((gTeamShields[var_v1] <= 0) && (gGameFrameCount & 4) && (gTeamShields[var_v1] != -2) &&
(D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) && (D_ctx_801782A4 != 1000)) {
(D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP) &&
(D_ctx_801782A4 != RCID_1000)) {
RCP_SetupDL(&gMasterDisp, 0x4C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
func_hud_80084B94(1);
}
if (((D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3)) && (D_ctx_801782A4 != 1000)) {
if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) &&
(D_ctx_801782A4 != RCID_1000)) {
func_hud_80086110(22.0f, 165.0f, gTeamShields[var_v1]);
}
}
@@ -744,17 +746,19 @@ void func_radio_800BB5D0(void) {
}
if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) &&
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) &&
(D_ctx_801782A4 != 1000)) {
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_801782A4 != RCID_STATIC) &&
(D_ctx_801782A4 != RCID_STATIC_FLIP) && (D_ctx_801782A4 != RCID_1000)) {
RCP_SetupDL(&gMasterDisp, 0x4C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
}
if (((D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3)) && (D_ctx_801782A4 != 1000)) {
if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) &&
(D_ctx_801782A4 != RCID_1000)) {
func_hud_80086110(22.0f, 165.0f, gActors[var_v1].health * 2.55f);
}
}
if (((D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3)) && (D_ctx_801782A4 != 1000)) {
if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) &&
(D_ctx_801782A4 != RCID_1000)) {
func_hud_8008AD94();
}
}
@@ -775,7 +779,7 @@ void func_radio_800BC040(void) {
switch (gRadioState) {
case 100:
D_ctx_801782A4 = 1000;
D_ctx_801782A4 = RCID_1000;
gRadioState = 1;
D_ctx_80177D38 = 0.0f;
D_ctx_80177D50 = 0.0f;
@@ -799,10 +803,10 @@ void func_radio_800BC040(void) {
D_Timer_801782AC = 5;
}
D_ctx_801782A4 = 2;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
break;
@@ -845,10 +849,10 @@ void func_radio_800BC040(void) {
gRadioState++;
}
D_ctx_801782A4 = 2;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
D_ctx_80177D50 -= 0.015f;
@@ -864,9 +868,9 @@ void func_radio_800BC040(void) {
gRadioState = 0;
D_Timer_801782AC = 5;
}
D_ctx_801782A4 = 2;
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
D_ctx_801782A4 = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
D_ctx_801782A4 = RCID_STATIC_FLIP;
}
break;
+2 -2
View File
@@ -39,7 +39,7 @@ u16 Save_Checksum(Save* arg0) {
}
s32 Save_Write(void) {
void* sp1C;
OSMesg sp1C;
gSaveFile.save.checksum = Save_Checksum(&gSaveFile.save);
gSaveFile.backup = gSaveFile.save;
@@ -53,7 +53,7 @@ s32 Save_Write(void) {
}
s32 Save_Read(void) {
void* sp24;
OSMesg sp24;
s32 i;
osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_SAVE, OS_MESG_PRI_NORMAL);
+28 -28
View File
@@ -538,7 +538,7 @@ s32 Math_PursueVec3f(Vec3f* pos, Vec3f* target, Vec3f* rot, f32 stepSize, f32 sc
return (VEC3F_MAG(&diff)) < dist;
}
void TextureRect_4bCI(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_4bCI(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette);
gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
@@ -548,7 +548,7 @@ void TextureRect_4bCI(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32
(s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_4bCI_Flip(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos,
void TextureRect_4bCI_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos,
f32 xScale, f32 yScale) {
gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette);
gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
@@ -558,7 +558,7 @@ void TextureRect_4bCI_Flip(Gfx** gfxPtr, void* texture, void* palette, u32 width
G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_4bCI_MirX(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos,
void TextureRect_4bCI_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos,
f32 xScale, f32 yScale) {
gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette);
gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_MIRROR | G_TX_WRAP,
@@ -568,7 +568,7 @@ void TextureRect_4bCI_MirX(Gfx** gfxPtr, void* texture, void* palette, u32 width
(u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_4bCI_MirY(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos,
void TextureRect_4bCI_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos,
f32 xScale, f32 yScale) {
gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette);
gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_MIRROR | G_TX_WRAP,
@@ -578,7 +578,7 @@ void TextureRect_4bCI_MirY(Gfx** gfxPtr, void* texture, void* palette, u32 width
(s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f));
}
void TextureRect_8bCI(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_8bCI(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTLUT_pal256((*gfxPtr)++, palette);
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
@@ -588,16 +588,16 @@ void TextureRect_8bCI(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32
(s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_16bRGBA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_16bRGBA(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f),
(s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, (s32) (1.0f / xScale * 1024.0f),
(s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f),
(s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_16bRGBA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_16bRGBA_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -606,15 +606,15 @@ void TextureRect_16bRGBA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height
(u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_8bIA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
void TextureRect_8bIA(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f),
(s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, (s32) (1.0f / xScale * 1024.0f),
(s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f),
(s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_8bIA_FilpMirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_8bIA_FilpMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -624,7 +624,7 @@ void TextureRect_8bIA_FilpMirX(Gfx** gfxPtr, void* texture, u32 width, u32 heigh
(s32) (1.0f / xScale * 1024.0f));
}
void TextureRect_8bIA_FilpMirY(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_8bIA_FilpMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -634,7 +634,7 @@ void TextureRect_8bIA_FilpMirY(Gfx** gfxPtr, void* texture, u32 width, u32 heigh
(u16) (s32) (-1.0f / xScale * 1024.0f));
}
void TextureRect_8bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_8bIA_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -643,7 +643,7 @@ void TextureRect_8bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f
(u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_8bIA_MirY(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_8bIA_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -652,7 +652,7 @@ void TextureRect_8bIA_MirY(Gfx** gfxPtr, void* texture, u32 width, u32 height, f
(s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f));
}
void TextureRect_16bIA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
void TextureRect_16bIA(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f),
@@ -660,7 +660,7 @@ void TextureRect_16bIA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 x
(s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_16bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_16bIA_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -669,7 +669,7 @@ void TextureRect_16bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height,
(u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f));
}
void TextureRect_16bIA_MirY(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_16bIA_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -678,7 +678,7 @@ void TextureRect_16bIA_MirY(Gfx** gfxPtr, void* texture, u32 width, u32 height,
(s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f));
}
void TextureRect_16bIA_MirXY(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_16bIA_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -687,7 +687,7 @@ void TextureRect_16bIA_MirXY(Gfx** gfxPtr, void* texture, u32 width, u32 height,
(u16) (s32) (-1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f));
}
void TextureRect_32bRGBA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
void TextureRect_32bRGBA(Gfx** gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale,
f32 yScale) {
gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -761,7 +761,7 @@ u16* Graphics_SetupTextureRender(Gfx** gfxPtr, u8 width, u8 height) {
gDPSetFillColor((*gfxPtr)++, FILL_COLOR(gBgColor | 1));
gDPFillRectangle((*gfxPtr)++, 0, 0, width - 1, height - 1);
gDPPipeSync((*gfxPtr)++);
guPerspective(gGfxMtx, &norm, D_game_80161A3C, (f32) width / height, 10.0f, 12800.0f, 1.0f);
guPerspective(gGfxMtx, &norm, gFovY, (f32) width / height, 10.0f, 12800.0f, 1.0f);
gSPPerspNormalize((*gfxPtr)++, norm);
gSPMatrix((*gfxPtr)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(gGfxMtx, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -12800.0f, 0.0f, 1.0f, 0.0f);
@@ -818,22 +818,22 @@ char sSmallChars[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ!:-.0123456789";
char sLargeChars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ. 0123456789st-";
u8 sLargeCharWidths[] = { 15, 14, 14, 13, 13, 13, 14, 14, 5, 12, 14, 12, 16, 14, 15, 13, 16, 14, 13, 13, 13,
16, 17, 17, 16, 13, 5, 16, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 9, 14, 0 };
void* sLargeCharTex[] = {
u8* sLargeCharTex[] = {
D_5008020, D_5008110, D_5008200, D_50082F0, D_50083E0, D_50084D0, D_50085C0, D_50086B0, D_50087A0,
D_5008890, D_5008980, D_5008A70, D_5008B60, D_5008C50, D_5008D40, D_5008E30, D_5008F20, D_5009010,
D_5009100, D_50091F0, D_50092E0, D_50093D0, D_50094C0, D_50096A0, D_5009880, D_5009A60, D_5009DB0,
NULL, D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, D_500A410, D_500A500, D_500A5F0,
D_500A6E0, D_500A7D0, D_5009B50, D_5009C40, D_5009970,
};
void* sLargeNumberTex[] = {
u8* sLargeNumberTex[] = {
D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0,
};
void* sSmallCharTex[] = { NULL, D_50070C0, D_5007100, D_5007180, D_50071C0, D_5007200, D_5007510,
D_5007550, D_5007590, D_50075D0, D_5007610, D_5007650, D_5007F60, D_5007FA0,
D_5007FE0, D_5009D30, D_5009D70, D_5009EA0, D_5009EE0, D_5009F20, D_500B380,
D_500B440, D_500B480, D_500B4C0, D_500B500, D_500B540, D_500B5C0, D_5007140,
D_500B400, D_500B580, D_500B3C0, D_5000000, D_5000080, D_5000100, D_5000180,
D_5000200, D_5000280, D_5000300, D_5000380, D_5000400, D_5000480 };
u8* sSmallCharTex[] = { NULL, D_50070C0, D_5007100, D_5007180, D_50071C0, D_5007200, D_5007510,
D_5007550, D_5007590, D_50075D0, D_5007610, D_5007650, D_5007F60, D_5007FA0,
D_5007FE0, D_5009D30, D_5009D70, D_5009EA0, D_5009EE0, D_5009F20, D_500B380,
D_500B440, D_500B480, D_500B4C0, D_500B500, D_500B540, D_500B5C0, D_5007140,
D_500B400, D_500B580, D_500B3C0, D_5000000, D_5000080, D_5000100, D_5000180,
D_5000200, D_5000280, D_5000300, D_5000380, D_5000400, D_5000480 };
void Graphics_DisplayLargeText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* text) {
u32 charIndex;
+13 -13
View File
@@ -52,7 +52,7 @@ void func_versus_800BC760(void) {
s32 i;
Memory_FreeAll();
func_play_800A6148();
Play_ClearObjectData();
for (i = 0; i < gCamCount; i++) {
Audio_KillSfxBySource(gPlayer[i].sfxSource);
@@ -61,7 +61,7 @@ void func_versus_800BC760(void) {
gGameState = GSTATE_INIT;
gNextGameStateTimer = 2;
gCamCount = GSTATE_INIT;
gCamCount = 1;
gPlayState = PLAY_STANDBY;
gDrawMode = DRAW_NONE;
D_ctx_80177AE0 = 0;
@@ -336,7 +336,7 @@ void func_versus_800BDE44(void) {
} else {
D_80178810[i] = 0;
}
AUDIO_PLAY_SFX(0x49004007U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4);
}
}
@@ -365,12 +365,12 @@ s32 func_versus_800BE078(void) {
if ((D_versus_80178768[1] -= temp) >= 0) {
if ((D_versus_80178768[0] == 0) && (D_versus_80178768[1] < 15) && (D_versus_80178768[1] >= 0)) {
AUDIO_PLAY_SFX(0x4900C02AU, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4);
}
break;
}
// clang-format off
if (D_versus_80178768[0] == 0) { AUDIO_PLAY_SFX(0x4900D036U, gDefaultSfxSource, 4U); }
if (D_versus_80178768[0] == 0) { AUDIO_PLAY_SFX(0x4900D036, gDefaultSfxSource, 4); }
// clang-format on
D_versus_80178768[1] *= -1;
temp = (D_versus_80178768[1] / 60) + 1;
@@ -466,19 +466,19 @@ s32 func_versus_800BE564(void) {
}
if ((sUnlockLandmaster) && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) {
AUDIO_PLAY_SFX(0x49000003U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4);
D_80178780[i] = 2;
}
if ((sUnlockOnFoot) && (D_80178780[i] == 0) &&
((gControllerPress[i].button & L_CBUTTONS) || (gControllerPress[i].button & D_CBUTTONS) ||
(gControllerPress[i].button & U_CBUTTONS) || (gControllerPress[i].button & R_CBUTTONS))) {
AUDIO_PLAY_SFX(0x49000003U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4);
D_80178780[i] = 3;
}
if ((D_80178780[i] == 0) && (gControllerPress[i].button & A_BUTTON)) {
AUDIO_PLAY_SFX(0x49000003U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4);
D_80178780[i] = 1;
}
@@ -601,10 +601,10 @@ s32 func_versus_800BEF00(void) {
if (D_80178794 == 0) {
D_80178790--;
if (D_80178790 != 0) {
AUDIO_PLAY_SFX(0x49000008U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49000008, gDefaultSfxSource, 4);
ret = 0;
} else {
AUDIO_PLAY_SFX(0x49000009U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49000009, gDefaultSfxSource, 4);
ret = 1;
}
D_80178794 = 30;
@@ -1134,7 +1134,7 @@ s32 func_versus_800C07C4(void) {
}
// clang-format off
if (ret != 0) { AUDIO_PLAY_SFX(0x49000002U, gDefaultSfxSource, 4U); }
if (ret != 0) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); }
// clang-format on
return ret;
@@ -1260,7 +1260,7 @@ bool func_versus_800C0D10(void) {
if (cont == 4) {
D_800D4A90 = 2;
} else {
AUDIO_PLAY_SFX(0x49004007U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4);
}
break;
@@ -1311,7 +1311,7 @@ s32 func_versus_800C0E78(void) {
bool func_versus_800C107C(s32 arg0) {
D_80178798++;
if (D_80178798 == 10) {
AUDIO_PLAY_SFX(0x49004007U, gDefaultSfxSource, 4U);
AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4);
D_801787B8++;
D_80178798 = 0;
}